diff options
author | Jim Ingham <jingham@apple.com> | 2013-02-09 01:29:05 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2013-02-09 01:29:05 +0000 |
commit | 0161b49cbadd54431b4acefa8dae954ebef12ec8 (patch) | |
tree | 2f6c58512e07b7d65af0a6de0a0fd9df6e1d6013 /lldb/source/Target/Thread.cpp | |
parent | 1aa79e9f637d9f5fb514095e8b29108bd15c261f (diff) | |
download | bcm5719-llvm-0161b49cbadd54431b4acefa8dae954ebef12ec8.tar.gz bcm5719-llvm-0161b49cbadd54431b4acefa8dae954ebef12ec8.zip |
Reworked the way Process::RunThreadPlan and the ThreadPlanCallFunction interoperate to fix problems where
hitting auto-continue signals while running a thread plan would cause us to lose control of the debug
session.
<rdar://problem/12993641>
llvm-svn: 174793
Diffstat (limited to 'lldb/source/Target/Thread.cpp')
-rw-r--r-- | lldb/source/Target/Thread.cpp | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp index f0893bab14d..3620f49f617 100644 --- a/lldb/source/Target/Thread.cpp +++ b/lldb/source/Target/Thread.cpp @@ -646,7 +646,7 @@ Thread::ShouldStop (Event* event_ptr) bool done_processing_current_plan = false; - if (!current_plan->PlanExplainsStop()) + if (!current_plan->PlanExplainsStop(event_ptr)) { if (current_plan->TracerExplainsStop()) { @@ -660,7 +660,7 @@ Thread::ShouldStop (Event* event_ptr) ThreadPlan *plan_ptr = current_plan; while ((plan_ptr = GetPreviousPlan(plan_ptr)) != NULL) { - if (plan_ptr->PlanExplainsStop()) + if (plan_ptr->PlanExplainsStop(event_ptr)) { should_stop = plan_ptr->ShouldStop (event_ptr); @@ -831,9 +831,24 @@ Thread::ShouldReportStop (Event* event_ptr) } else { + Vote thread_vote = eVoteNoOpinion; + ThreadPlan *plan_ptr = GetCurrentPlan(); + while (1) + { + if (plan_ptr->PlanExplainsStop(event_ptr)) + { + thread_vote = plan_ptr->ShouldReportStop(event_ptr); + break; + } + if (PlanIsBasePlan(plan_ptr)) + break; + else + plan_ptr = GetPreviousPlan(plan_ptr); + } if (log) - log->Printf ("Thread::ShouldReportStop() tid = 0x%4.4" PRIx64 ": returning vote for current plan\n", GetID()); - return GetCurrentPlan()->ShouldReportStop (event_ptr); + log->Printf ("Thread::ShouldReportStop() tid = 0x%4.4" PRIx64 ": returning vote %i for current plan\n", GetID(), thread_vote); + + return thread_vote; } } |