summaryrefslogtreecommitdiff
path: root/lldb/source/Target/ThreadPlanRunToAddress.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Target/ThreadPlanRunToAddress.cpp')
-rw-r--r--lldb/source/Target/ThreadPlanRunToAddress.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/lldb/source/Target/ThreadPlanRunToAddress.cpp b/lldb/source/Target/ThreadPlanRunToAddress.cpp
index 32ea2e675270..cb4a58b1cf25 100644
--- a/lldb/source/Target/ThreadPlanRunToAddress.cpp
+++ b/lldb/source/Target/ThreadPlanRunToAddress.cpp
@@ -1,4 +1,4 @@
-//===-- ThreadPlanRunToAddress.cpp ------------------------------*- C++ -*-===//
+//===-- ThreadPlanRunToAddress.cpp ----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -25,7 +25,7 @@ ThreadPlanRunToAddress::ThreadPlanRunToAddress(Thread &thread, Address &address,
eVoteNoOpinion, eVoteNoOpinion),
m_stop_others(stop_others), m_addresses(), m_break_ids() {
m_addresses.push_back(
- address.GetOpcodeLoadAddress(m_thread.CalculateTarget().get()));
+ address.GetOpcodeLoadAddress(thread.CalculateTarget().get()));
SetInitialBreakpoints();
}
@@ -36,7 +36,7 @@ ThreadPlanRunToAddress::ThreadPlanRunToAddress(Thread &thread,
eVoteNoOpinion, eVoteNoOpinion),
m_stop_others(stop_others), m_addresses(), m_break_ids() {
m_addresses.push_back(
- m_thread.CalculateTarget()->GetOpcodeLoadAddress(address));
+ thread.CalculateTarget()->GetOpcodeLoadAddress(address));
SetInitialBreakpoints();
}
@@ -62,14 +62,13 @@ void ThreadPlanRunToAddress::SetInitialBreakpoints() {
for (size_t i = 0; i < num_addresses; i++) {
Breakpoint *breakpoint;
- breakpoint = m_thread.CalculateTarget()
- ->CreateBreakpoint(m_addresses[i], true, false)
- .get();
+ breakpoint =
+ GetTarget().CreateBreakpoint(m_addresses[i], true, false).get();
if (breakpoint != nullptr) {
if (breakpoint->IsHardware() && !breakpoint->HasResolvedLocations())
m_could_not_resolve_hw_bp = true;
m_break_ids[i] = breakpoint->GetID();
- breakpoint->SetThreadID(m_thread.GetID());
+ breakpoint->SetThreadID(m_tid);
breakpoint->SetBreakpointKind("run-to-address");
}
}
@@ -78,7 +77,7 @@ void ThreadPlanRunToAddress::SetInitialBreakpoints() {
ThreadPlanRunToAddress::~ThreadPlanRunToAddress() {
size_t num_break_ids = m_break_ids.size();
for (size_t i = 0; i < num_break_ids; i++) {
- m_thread.CalculateTarget()->RemoveBreakpointByID(m_break_ids[i]);
+ GetTarget().RemoveBreakpointByID(m_break_ids[i]);
}
m_could_not_resolve_hw_bp = false;
}
@@ -119,7 +118,7 @@ void ThreadPlanRunToAddress::GetDescription(Stream *s,
DumpAddress(s->AsRawOstream(), m_addresses[i], sizeof(addr_t));
s->Printf(" using breakpoint: %d - ", m_break_ids[i]);
Breakpoint *breakpoint =
- m_thread.CalculateTarget()->GetBreakpointByID(m_break_ids[i]).get();
+ GetTarget().GetBreakpointByID(m_break_ids[i]).get();
if (breakpoint)
breakpoint->Dump(s);
else
@@ -178,7 +177,7 @@ bool ThreadPlanRunToAddress::MischiefManaged() {
for (size_t i = 0; i < num_break_ids; i++) {
if (m_break_ids[i] != LLDB_INVALID_BREAK_ID) {
- m_thread.CalculateTarget()->RemoveBreakpointByID(m_break_ids[i]);
+ GetTarget().RemoveBreakpointByID(m_break_ids[i]);
m_break_ids[i] = LLDB_INVALID_BREAK_ID;
}
}
@@ -190,7 +189,7 @@ bool ThreadPlanRunToAddress::MischiefManaged() {
}
bool ThreadPlanRunToAddress::AtOurAddress() {
- lldb::addr_t current_address = m_thread.GetRegisterContext()->GetPC();
+ lldb::addr_t current_address = GetThread().GetRegisterContext()->GetPC();
bool found_it = false;
size_t num_addresses = m_addresses.size();
for (size_t i = 0; i < num_addresses; i++) {