diff options
author | Greg Clayton <gclayton@apple.com> | 2011-05-19 18:17:41 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2011-05-19 18:17:41 +0000 |
commit | 92bb12ca3e6dfbbebf906257f758d0b1a30ed425 (patch) | |
tree | 2b6f65bd2bf3fbc8af09f6c56987a8214d8cc3c0 /lldb/source/Target/Process.cpp | |
parent | 92ab6db6c8d2ebd4c71eb4d2b45d2233bfbef6ab (diff) | |
download | bcm5719-llvm-92bb12ca3e6dfbbebf906257f758d0b1a30ed425.tar.gz bcm5719-llvm-92bb12ca3e6dfbbebf906257f758d0b1a30ed425.zip |
Moved a lot of simple functions from StoppointLocation.cpp to be inlined in
StoppointLocation.h.
Added a new lldb_private::Address function:
addr_t
Address::GetOpcodeLoadAddress (Target *target) const;
This will strip any special bits from an address to make sure it is suitable
for use in addressing an opcode. Often ARM addresses have an extra bit zero
that can be set to indicate ARM vs Thumb addresses (gotten from return address
registers, or symbol addresses that may be marked up specially). We need to
strip these bits off prior to setting breakpoints, so we can centralized the
place to do this inside the Address class.
llvm-svn: 131658
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r-- | lldb/source/Target/Process.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index d5a441bccba..58df901f2ad 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -1323,7 +1323,7 @@ Process::EnableBreakpointSiteByID (lldb::user_id_t break_id) lldb::break_id_t Process::CreateBreakpointSite (BreakpointLocationSP &owner, bool use_hardware) { - const addr_t load_addr = owner->GetAddress().GetLoadAddress (&m_target); + const addr_t load_addr = owner->GetAddress().GetOpcodeLoadAddress (&m_target); if (load_addr != LLDB_INVALID_ADDRESS) { BreakpointSiteSP bp_site_sp; @@ -3240,7 +3240,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx, } // Save this value for restoration of the execution context after we run - uint32_t tid = exe_ctx.thread->GetIndexID(); + const uint32_t thread_idx_id = exe_ctx.thread->GetIndexID(); // N.B. Running the target may unset the currently selected thread and frame. We don't want to do that either, // so we should arrange to reset them as well. @@ -3378,12 +3378,12 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx, case lldb::eStateStopped: { // Yay, we're done. Now make sure that our thread plan actually completed. - ThreadSP thread_sp = exe_ctx.process->GetThreadList().FindThreadByIndexID (tid); + ThreadSP thread_sp = exe_ctx.process->GetThreadList().FindThreadByIndexID (thread_idx_id); if (!thread_sp) { // Ooh, our thread has vanished. Unlikely that this was successful execution... if (log) - log->Printf ("Execution completed but our thread has vanished."); + log->Printf ("Execution completed but our thread (index-id=%u) has vanished.", thread_idx_id); return_value = eExecutionInterrupted; } else @@ -3733,7 +3733,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx, // Thread we ran the function in may have gone away because we ran the target // Check that it's still there. - exe_ctx.thread = exe_ctx.process->GetThreadList().FindThreadByIndexID(tid, true).get(); + exe_ctx.thread = exe_ctx.process->GetThreadList().FindThreadByIndexID(thread_idx_id, true).get(); if (exe_ctx.thread) exe_ctx.frame = exe_ctx.thread->GetStackFrameAtIndex(0).get(); |