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.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154351 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/ThreadPlanCallFunction.cpp b/source/Target/ThreadPlanCallFunction.cpp
index 09bdd3d..9f6c18e 100644
--- a/source/Target/ThreadPlanCallFunction.cpp
+++ b/source/Target/ThreadPlanCallFunction.cpp
@@ -52,6 +52,9 @@
m_takedown_done (false),
m_stop_address (LLDB_INVALID_ADDRESS)
{
+ // Call function thread plans need to be master plans so that they can potentially stay on the stack when
+ // a breakpoint is hit during the function call.
+ SetIsMasterPlan (true);
SetOkayToDiscard (discard_on_error);
ProcessSP process_sp (thread.GetProcess());
@@ -172,6 +175,9 @@
m_return_type (return_type),
m_takedown_done (false)
{
+ // Call function thread plans need to be master plans so that they can potentially stay on the stack when
+ // a breakpoint is hit during the function call.
+ SetIsMasterPlan (true);
SetOkayToDiscard (discard_on_error);
ProcessSP process_sp (thread.GetProcess());