[llvm-branch-commits] [lldb] r198390 - Fix a crasher when launching due to changes to the ExecutionContext class.
Greg Clayton
gclayton at apple.com
Thu Jan 2 17:59:22 PST 2014
Author: gclayton
Date: Thu Jan 2 19:59:22 2014
New Revision: 198390
URL: http://llvm.org/viewvc/llvm-project?rev=198390&view=rev
Log:
Fix a crasher when launching due to changes to the ExecutionContext class.
Modified:
lldb/branches/iohandler/source/Target/ExecutionContext.cpp
Modified: lldb/branches/iohandler/source/Target/ExecutionContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/iohandler/source/Target/ExecutionContext.cpp?rev=198390&r1=198389&r2=198390&view=diff
==============================================================================
--- lldb/branches/iohandler/source/Target/ExecutionContext.cpp (original)
+++ lldb/branches/iohandler/source/Target/ExecutionContext.cpp Thu Jan 2 19:59:22 2014
@@ -127,10 +127,10 @@ ExecutionContext::ExecutionContext (Targ
if (t && fill_current_process_thread_frame)
{
m_process_sp = t->GetProcessSP();
- if (m_process_sp && StateIsStoppedState(m_process_sp->GetState(), true))
+ if (m_process_sp)
{
m_thread_sp = m_process_sp->GetThreadList().GetSelectedThread();
- if (m_thread_sp)
+ if (StateIsStoppedState(m_process_sp->GetState(), true) && m_thread_sp)
m_frame_sp = m_thread_sp->GetSelectedFrame();
}
}
@@ -152,10 +152,11 @@ ExecutionContext::ExecutionContext (cons
m_thread_sp (),
m_frame_sp ()
{
- if (m_process_sp && StateIsStoppedState(m_process_sp->GetState(), true))
+ if (m_process_sp)
{
m_thread_sp = exe_ctx_ref.GetThreadSP();
- m_frame_sp = exe_ctx_ref.GetFrameSP();
+ if (StateIsStoppedState(m_process_sp->GetState(), true))
+ m_frame_sp = exe_ctx_ref.GetFrameSP();
}
}
@@ -169,10 +170,11 @@ ExecutionContext::ExecutionContext (cons
{
m_target_sp = exe_ctx_ref_ptr->GetTargetSP();
m_process_sp = exe_ctx_ref_ptr->GetProcessSP();
- if (m_process_sp && StateIsStoppedState(m_process_sp->GetState(), true))
+ if (m_process_sp)
{
m_thread_sp = exe_ctx_ref_ptr->GetThreadSP();
- m_frame_sp = exe_ctx_ref_ptr->GetFrameSP();
+ if (StateIsStoppedState(m_process_sp->GetState(), true))
+ m_frame_sp = exe_ctx_ref_ptr->GetFrameSP();
}
}
}
@@ -190,10 +192,11 @@ ExecutionContext::ExecutionContext (cons
{
locker.Lock(m_target_sp->GetAPIMutex());
m_process_sp = exe_ctx_ref_ptr->GetProcessSP();
- if (m_process_sp && StateIsStoppedState(m_process_sp->GetState(), true))
+ if (m_process_sp)
{
m_thread_sp = exe_ctx_ref_ptr->GetThreadSP();
- m_frame_sp = exe_ctx_ref_ptr->GetFrameSP();
+ if (StateIsStoppedState(m_process_sp->GetState(), true))
+ m_frame_sp = exe_ctx_ref_ptr->GetFrameSP();
}
}
}
@@ -209,11 +212,9 @@ ExecutionContext::ExecutionContext (cons
{
locker.Lock(m_target_sp->GetAPIMutex());
m_process_sp = exe_ctx_ref.GetProcessSP();
+ m_thread_sp = exe_ctx_ref.GetThreadSP();
if (m_process_sp && StateIsStoppedState(m_process_sp->GetState(), true))
- {
- m_thread_sp = exe_ctx_ref.GetThreadSP();
m_frame_sp = exe_ctx_ref.GetFrameSP();
- }
}
}
More information about the llvm-branch-commits
mailing list