diff options
author | Jim Ingham <jingham@apple.com> | 2012-04-09 22:37:39 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2012-04-09 22:37:39 +0000 |
commit | cf274f910e3885035c278c4ea9df770678d3a8dd (patch) | |
tree | 337ed77a018d0bb913420cee1010fd9db1ea4dc8 /lldb/source/Target/Thread.cpp | |
parent | 383fda29befaca805e04d8160ada6234a75d2ec4 (diff) | |
download | bcm5719-llvm-cf274f910e3885035c278c4ea9df770678d3a8dd.tar.gz bcm5719-llvm-cf274f910e3885035c278c4ea9df770678d3a8dd.zip |
Rework how master plans declare themselves. Also make "PlanIsBasePlan" not rely only on this being the bottom plan in the stack, but allow the plan to declare itself as such.
llvm-svn: 154351
Diffstat (limited to 'lldb/source/Target/Thread.cpp')
-rw-r--r-- | lldb/source/Target/Thread.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp index 6a86a3b435b..fe5c4295443 100644 --- a/lldb/source/Target/Thread.cpp +++ b/lldb/source/Target/Thread.cpp @@ -349,7 +349,7 @@ Thread::ShouldStop (Event* event_ptr) } else { - // If the current plan doesn't explain the stop, then, find one that + // If the current plan doesn't explain the stop, then find one that // does and let it handle the situation. ThreadPlan *plan_ptr = current_plan; while ((plan_ptr = GetPreviousPlan(plan_ptr)) != NULL) @@ -839,6 +839,17 @@ Thread::DiscardThreadPlans(bool force) } } +bool +Thread::PlanIsBasePlan (ThreadPlan *plan_ptr) +{ + if (plan_ptr->IsBasePlan()) + return true; + else if (m_plan_stack.size() == 0) + return false; + else + return m_plan_stack[0].get() == plan_ptr; +} + ThreadPlan * Thread::QueueFundamentalPlan (bool abort_other_plans) { |