summaryrefslogtreecommitdiff
path: root/lldb/source/Target/Thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Target/Thread.cpp')
-rw-r--r--lldb/source/Target/Thread.cpp29
1 files changed, 14 insertions, 15 deletions
diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp
index b423f1b5f1fe..1b32331d98f7 100644
--- a/lldb/source/Target/Thread.cpp
+++ b/lldb/source/Target/Thread.cpp
@@ -55,12 +55,11 @@
using namespace lldb;
using namespace lldb_private;
-const ThreadPropertiesSP &Thread::GetGlobalProperties() {
+ThreadProperties &Thread::GetGlobalProperties() {
// NOTE: intentional leak so we don't crash if global destructor chain gets
// called as other threads still use the result of this function
- static ThreadPropertiesSP *g_settings_sp_ptr =
- new ThreadPropertiesSP(new ThreadProperties(true));
- return *g_settings_sp_ptr;
+ static ThreadProperties *g_settings_ptr = new ThreadProperties(true);
+ return *g_settings_ptr;
}
#define LLDB_PROPERTIES_thread
@@ -103,7 +102,7 @@ ThreadProperties::ThreadProperties(bool is_global) : Properties() {
m_collection_sp->Initialize(g_thread_properties);
} else
m_collection_sp =
- OptionValueProperties::CreateLocalCopy(*Thread::GetGlobalProperties());
+ OptionValueProperties::CreateLocalCopy(Thread::GetGlobalProperties());
}
ThreadProperties::~ThreadProperties() = default;
@@ -845,7 +844,7 @@ bool Thread::ShouldStop(Event *event_ptr) {
// we're done, otherwise we forward this to the next plan in the
// stack below.
done_processing_current_plan =
- (plan_ptr->IsMasterPlan() && !plan_ptr->OkayToDiscard());
+ (plan_ptr->IsControllingPlan() && !plan_ptr->OkayToDiscard());
} else
done_processing_current_plan = true;
@@ -883,11 +882,11 @@ bool Thread::ShouldStop(Event *event_ptr) {
current_plan->GetName());
}
- // If a Master Plan wants to stop, we let it. Otherwise, see if the
- // plan's parent wants to stop.
+ // If a Controlling Plan wants to stop, we let it. Otherwise, see if
+ // the plan's parent wants to stop.
PopPlan();
- if (should_stop && current_plan->IsMasterPlan() &&
+ if (should_stop && current_plan->IsControllingPlan() &&
!current_plan->OkayToDiscard()) {
break;
}
@@ -906,8 +905,8 @@ bool Thread::ShouldStop(Event *event_ptr) {
should_stop = false;
}
- // One other potential problem is that we set up a master plan, then stop in
- // before it is complete - for instance by hitting a breakpoint during a
+ // One other potential problem is that we set up a controlling plan, then stop
+ // in before it is complete - for instance by hitting a breakpoint during a
// step-over - then do some step/finish/etc operations that wind up past the
// end point condition of the initial plan. We don't want to strand the
// original plan on the stack, This code clears stale plans off the stack.
@@ -1215,7 +1214,7 @@ void Thread::DiscardThreadPlans(bool force) {
GetPlans().DiscardAllPlans();
return;
}
- GetPlans().DiscardConsultingMasterPlans();
+ GetPlans().DiscardConsultingControllingPlans();
}
Status Thread::UnwindInnermostExpression() {
@@ -1915,7 +1914,7 @@ Status Thread::StepIn(bool source_step,
false, abort_other_plans, run_mode, error);
}
- new_plan_sp->SetIsMasterPlan(true);
+ new_plan_sp->SetIsControllingPlan(true);
new_plan_sp->SetOkayToDiscard(false);
// Why do we need to set the current thread by ID here???
@@ -1948,7 +1947,7 @@ Status Thread::StepOver(bool source_step,
true, abort_other_plans, run_mode, error);
}
- new_plan_sp->SetIsMasterPlan(true);
+ new_plan_sp->SetIsControllingPlan(true);
new_plan_sp->SetOkayToDiscard(false);
// Why do we need to set the current thread by ID here???
@@ -1972,7 +1971,7 @@ Status Thread::StepOut() {
abort_other_plans, nullptr, first_instruction, stop_other_threads,
eVoteYes, eVoteNoOpinion, 0, error));
- new_plan_sp->SetIsMasterPlan(true);
+ new_plan_sp->SetIsControllingPlan(true);
new_plan_sp->SetOkayToDiscard(false);
// Why do we need to set the current thread by ID here???