LLDB  mainline
ThreadPlanRunToAddress.h
Go to the documentation of this file.
1 //===-- ThreadPlanRunToAddress.h --------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_TARGET_THREADPLANRUNTOADDRESS_H
10 #define LLDB_TARGET_THREADPLANRUNTOADDRESS_H
11 
12 #include <vector>
13 
14 #include "lldb/Target/ThreadPlan.h"
15 #include "lldb/lldb-private.h"
16 
17 namespace lldb_private {
18 
20 public:
21  ThreadPlanRunToAddress(Thread &thread, Address &address, bool stop_others);
22 
24  bool stop_others);
25 
27  const std::vector<lldb::addr_t> &addresses,
28  bool stop_others);
29 
30  ~ThreadPlanRunToAddress() override;
31 
32  void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
33 
34  bool ValidatePlan(Stream *error) override;
35 
36  bool ShouldStop(Event *event_ptr) override;
37 
38  bool StopOthers() override;
39 
40  void SetStopOthers(bool new_value) override;
41 
43 
44  bool WillStop() override;
45 
46  bool MischiefManaged() override;
47 
48 protected:
49  bool DoPlanExplainsStop(Event *event_ptr) override;
50 
51  void SetInitialBreakpoints();
52  bool AtOurAddress();
53 
54 private:
56  std::vector<lldb::addr_t>
57  m_addresses; // This is the address we are going to run to.
58  // TODO: Would it be useful to have multiple addresses?
59  std::vector<lldb::break_id_t> m_break_ids; // This is the breakpoint we are
60  // using to stop us at m_address.
61 
64  operator=(const ThreadPlanRunToAddress &) = delete;
65 };
66 
67 } // namespace lldb_private
68 
69 #endif // LLDB_TARGET_THREADPLANRUNTOADDRESS_H
A class that represents a running process on the host machine.
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
void SetStopOthers(bool new_value) override
bool ValidatePlan(Stream *error) override
Returns whether this plan could be successfully created.
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
std::vector< lldb::addr_t > m_addresses
static llvm::raw_ostream & error(Stream &strm)
bool DoPlanExplainsStop(Event *event_ptr) override
StateType
Process and Thread States.
A section + offset based address class.
Definition: Address.h:59
bool ShouldStop(Event *event_ptr) override
uint64_t addr_t
Definition: lldb-types.h:83
const ThreadPlanRunToAddress & operator=(const ThreadPlanRunToAddress &)=delete
void GetDescription(Stream *s, lldb::DescriptionLevel level) override
Print a description of this thread to the stream s.
ThreadPlanRunToAddress(Thread &thread, Address &address, bool stop_others)
std::vector< lldb::break_id_t > m_break_ids