diff options
author | Jim Ingham <jingham@apple.com> | 2011-11-01 02:46:54 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2011-11-01 02:46:54 +0000 |
commit | ce553d885abcce514e52618f0fd44f3c6940f171 (patch) | |
tree | 6eeb3eec23ea8d3a73cc27b1ed27f04efcc16cf3 /lldb/source/Target/ThreadPlanCallFunction.cpp | |
parent | fc08bdcc5761b64b0affc5ba9d7ab19812402089 (diff) | |
download | bcm5719-llvm-ce553d885abcce514e52618f0fd44f3c6940f171.tar.gz bcm5719-llvm-ce553d885abcce514e52618f0fd44f3c6940f171.zip |
Enhanced the ObjC DynamicCheckerFunction to test for "object responds to selector" as well as
"object borked"... Also made the error when the checker fails reflect this fact rather than
report a crash at 0x0.
Also a little cleanup:
- StopInfoMachException had a redundant copy of the description string.
- ThreadPlanCallFunction had a redundant copy of the thread, and had a
copy of the process that it didn't really need.
llvm-svn: 143419
Diffstat (limited to 'lldb/source/Target/ThreadPlanCallFunction.cpp')
-rw-r--r-- | lldb/source/Target/ThreadPlanCallFunction.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lldb/source/Target/ThreadPlanCallFunction.cpp b/lldb/source/Target/ThreadPlanCallFunction.cpp index a5eb4b96a06..2494c7cacfd 100644 --- a/lldb/source/Target/ThreadPlanCallFunction.cpp +++ b/lldb/source/Target/ThreadPlanCallFunction.cpp @@ -47,9 +47,8 @@ ThreadPlanCallFunction::ThreadPlanCallFunction (Thread &thread, m_stop_other_threads (stop_other_threads), m_function_addr (function), m_function_sp (NULL), - m_process (thread.GetProcess()), - m_thread (thread), - m_takedown_done (false) + m_takedown_done (false), + m_stop_address (LLDB_INVALID_ADDRESS) { SetOkayToDiscard (discard_on_error); @@ -163,8 +162,6 @@ ThreadPlanCallFunction::ThreadPlanCallFunction (Thread &thread, m_stop_other_threads (stop_other_threads), m_function_addr (function), m_function_sp(NULL), - m_process (thread.GetProcess()), - m_thread (thread), m_takedown_done (false) { SetOkayToDiscard (discard_on_error); @@ -294,6 +291,7 @@ ThreadPlanCallFunction::DoTakedown () if (log) log->Printf ("DoTakedown called for thread 0x%4.4llx, m_valid: %d complete: %d.\n", m_thread.GetID(), m_valid, IsPlanComplete()); m_takedown_done = true; + m_stop_address = m_thread.GetStackFrameAtIndex(0)->GetRegisterContext()->GetPC(); m_real_stop_info_sp = GetPrivateStopReason(); m_thread.RestoreThreadStateFromCheckpoint(m_stored_thread_state); SetPlanComplete(); @@ -324,7 +322,7 @@ ThreadPlanCallFunction::GetDescription (Stream *s, DescriptionLevel level) } else { - s->Printf("Thread plan to call 0x%llx", m_function_addr.GetLoadAddress(&m_process.GetTarget())); + s->Printf("Thread plan to call 0x%llx", m_function_addr.GetLoadAddress(&m_thread.GetProcess().GetTarget())); } } @@ -474,8 +472,8 @@ ThreadPlanCallFunction::MischiefManaged () void ThreadPlanCallFunction::SetBreakpoints () { - m_cxx_language_runtime = m_process.GetLanguageRuntime(eLanguageTypeC_plus_plus); - m_objc_language_runtime = m_process.GetLanguageRuntime(eLanguageTypeObjC); + m_cxx_language_runtime = m_thread.GetProcess().GetLanguageRuntime(eLanguageTypeC_plus_plus); + m_objc_language_runtime = m_thread.GetProcess().GetLanguageRuntime(eLanguageTypeObjC); if (m_cxx_language_runtime) m_cxx_language_runtime->SetExceptionBreakpoints(); |