27 m_stop_others(stop_others), m_addresses(), m_break_ids() {
38 m_stop_others(stop_others), m_addresses(), m_break_ids() {
45 Thread &thread,
const std::vector<lldb::addr_t> &addresses,
49 m_stop_others(stop_others), m_addresses(addresses), m_break_ids() {
53 std::vector<lldb::addr_t>::iterator pos, end =
m_addresses.end();
64 for (
size_t i = 0; i < num_addresses; i++) {
68 if (breakpoint !=
nullptr) {
80 for (
size_t i = 0; i < num_break_ids; i++) {
91 if (num_addresses == 0) {
92 s->
Printf(
"run to address with no addresses given.");
94 }
else if (num_addresses == 1)
95 s->
Printf(
"run to address: ");
97 s->
Printf(
"run to addresses: ");
99 for (
size_t i = 0; i < num_addresses; i++) {
104 if (num_addresses == 0) {
105 s->
Printf(
"run to address with no addresses given.");
107 }
else if (num_addresses == 1)
108 s->
Printf(
"Run to address: ");
110 s->
Printf(
"Run to addresses: ");
113 for (
size_t i = 0; i < num_addresses; i++) {
114 if (num_addresses > 1) {
126 s->
Printf(
"but the breakpoint has been deleted.");
134 error->Printf(
"Could not set hardware breakpoint(s)");
139 bool all_bps_good =
true;
141 for (
size_t i = 0; i < num_break_ids; i++) {
143 all_bps_good =
false;
145 error->Printf(
"Could not set breakpoint for address: ");
179 for (
size_t i = 0; i < num_break_ids; i++) {
185 LLDB_LOGF(log,
"Completed run to address plan.");
194 bool found_it =
false;
196 for (
size_t i = 0; i < num_addresses; i++) {
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_LOGF(log,...)
A section + offset based address class.
lldb::addr_t GetOpcodeLoadAddress(Target *target, AddressClass addr_class=AddressClass::eInvalid) const
Get the load address as an opcode load address.
General Outline: A breakpoint has four main parts, a filter, a resolver, the list of breakpoint locat...
void SetBreakpointKind(const char *kind)
Set the "kind" description for a breakpoint.
bool HasResolvedLocations() const
Return whether this breakpoint has any resolved locations.
void SetThreadID(lldb::tid_t thread_id)
Set the valid thread to be checked when the breakpoint is hit.
void Dump(Stream *s) override
Standard "Dump" method. At present it does nothing.
lldb::break_id_t GetID() const
A stream class that can stream formatted output to a file.
llvm::raw_ostream & AsRawOstream()
Returns a raw_ostream that forwards the data to this Stream object.
size_t Indent(llvm::StringRef s="")
Indent the current line in the stream.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
lldb::addr_t GetOpcodeLoadAddress(lldb::addr_t load_addr, AddressClass addr_class=AddressClass::eInvalid) const
Get load_addr as an opcode for this target.
lldb::BreakpointSP GetBreakpointByID(lldb::break_id_t break_id)
bool RemoveBreakpointByID(lldb::break_id_t break_id)
lldb::BreakpointSP CreateBreakpoint(const FileSpecList *containingModules, const FileSpec &file, uint32_t line_no, uint32_t column, lldb::addr_t offset, LazyBool check_inlines, LazyBool skip_prologue, bool internal, bool request_hardware, LazyBool move_to_nearest_code)
std::vector< lldb::addr_t > m_addresses
ThreadPlanRunToAddress(Thread &thread, Address &address, bool stop_others)
lldb::StateType GetPlanRunState() override
bool MischiefManaged() override
~ThreadPlanRunToAddress() override
void SetStopOthers(bool new_value) override
void SetInitialBreakpoints()
bool ShouldStop(Event *event_ptr) override
bool StopOthers() override
std::vector< lldb::break_id_t > m_break_ids
bool ValidatePlan(Stream *error) override
Returns whether this plan could be successfully created.
bool DoPlanExplainsStop(Event *event_ptr) override
void GetDescription(Stream *s, lldb::DescriptionLevel level) override
Print a description of this thread to the stream s.
Thread & GetThread()
Returns the Thread that is using this thread plan.
virtual bool MischiefManaged()
bool m_could_not_resolve_hw_bp
virtual lldb::RegisterContextSP GetRegisterContext()=0
lldb::TargetSP CalculateTarget() override
lldb::ProcessSP GetProcess() const
#define LLDB_INVALID_BREAK_ID
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
void DumpAddress(llvm::raw_ostream &s, uint64_t addr, uint32_t addr_size, const char *prefix=nullptr, const char *suffix=nullptr)
Output an address value to this stream.
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
StateType
Process and Thread States.
@ eStateRunning
Process or thread is running and can't be examined.