summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Thread.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-04-20 00:27:58 +0000
committerGreg Clayton <gclayton@apple.com>2013-04-20 00:27:58 +0000
commitd1d06e4744947c53fb4609f183a47fb12e9005a5 (patch)
tree4981fd5474b985cc37b5f0c224a39e6ae04df89c /lldb/source/Target/Thread.cpp
parent71dba2ce89aeb166aee5728ed4bd5931ae14f37e (diff)
downloadbcm5719-llvm-d1d06e4744947c53fb4609f183a47fb12e9005a5.tar.gz
bcm5719-llvm-d1d06e4744947c53fb4609f183a47fb12e9005a5.zip
<rdar://problem/13697881>
Fixed the GDB remote with the python OS plug-in to not show core threads when they aren't desired and also to have the threads "to the right thing" when continuing. llvm-svn: 179912
Diffstat (limited to 'lldb/source/Target/Thread.cpp')
-rw-r--r--lldb/source/Target/Thread.cpp33
1 files changed, 19 insertions, 14 deletions
diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp
index 378d0266d5a..72c9a2a5b64 100644
--- a/lldb/source/Target/Thread.cpp
+++ b/lldb/source/Target/Thread.cpp
@@ -542,20 +542,24 @@ Thread::WillResume (StateType resume_state)
// We distinguish between the plan on the top of the stack and the lower
// plans in case a plan needs to do any special business before it runs.
+ bool need_to_resume = false;
ThreadPlan *plan_ptr = GetCurrentPlan();
- bool need_to_resume = plan_ptr->WillResume(resume_state, true);
-
- while ((plan_ptr = GetPreviousPlan(plan_ptr)) != NULL)
- {
- plan_ptr->WillResume (resume_state, false);
- }
-
- // If the WillResume for the plan says we are faking a resume, then it will have set an appropriate stop info.
- // In that case, don't reset it here.
-
- if (need_to_resume && resume_state != eStateSuspended)
+ if (plan_ptr)
{
- m_actual_stop_info_sp.reset();
+ need_to_resume = plan_ptr->WillResume(resume_state, true);
+
+ while ((plan_ptr = GetPreviousPlan(plan_ptr)) != NULL)
+ {
+ plan_ptr->WillResume (resume_state, false);
+ }
+
+ // If the WillResume for the plan says we are faking a resume, then it will have set an appropriate stop info.
+ // In that case, don't reset it here.
+
+ if (need_to_resume && resume_state != eStateSuspended)
+ {
+ m_actual_stop_info_sp.reset();
+ }
}
return need_to_resume;
@@ -571,6 +575,7 @@ bool
Thread::ShouldStop (Event* event_ptr)
{
ThreadPlan *current_plan = GetCurrentPlan();
+
bool should_stop = true;
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
@@ -955,8 +960,8 @@ Thread::GetCurrentPlan ()
{
// There will always be at least the base plan. If somebody is mucking with a
// thread with an empty plan stack, we should assert right away.
- assert (!m_plan_stack.empty());
-
+ if (m_plan_stack.empty())
+ return NULL;
return m_plan_stack.back().get();
}
OpenPOWER on IntegriCloud