aboutsummaryrefslogtreecommitdiff
path: root/lldb/source
diff options
context:
space:
mode:
authorQuinn Pham <Quinn.Pham@ibm.com>2021-11-02 08:58:19 -0500
committerQuinn Pham <Quinn.Pham@ibm.com>2021-11-11 15:04:44 -0600
commit04cbfa950e0221ac334f802407a9b766df33eee5 (patch)
treeeff5e8494c0565aa537219a71771b534a5ec52ae /lldb/source
parent3e7ad1f2b2c0a753749eaba88d369d6032a50764 (diff)
downloadllvm-04cbfa950e0221ac334f802407a9b766df33eee5.zip
llvm-04cbfa950e0221ac334f802407a9b766df33eee5.tar.gz
llvm-04cbfa950e0221ac334f802407a9b766df33eee5.tar.bz2
[lldb][NFC] Inclusive Language: rename master plan to controlling plan
[NFC] As part of using inclusive language within the llvm project, this patch renames master plan to controlling plan in lldb. Reviewed By: jingham Differential Revision: https://reviews.llvm.org/D113019
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/API/SBThread.cpp6
-rw-r--r--lldb/source/Commands/CommandObjectThread.cpp13
-rw-r--r--lldb/source/Expression/FunctionCaller.cpp2
-rw-r--r--lldb/source/Target/Process.cpp15
-rw-r--r--lldb/source/Target/StopInfo.cpp2
-rw-r--r--lldb/source/Target/Thread.cpp20
-rw-r--r--lldb/source/Target/ThreadPlan.cpp6
-rw-r--r--lldb/source/Target/ThreadPlanBase.cpp6
-rw-r--r--lldb/source/Target/ThreadPlanCallFunction.cpp2
-rw-r--r--lldb/source/Target/ThreadPlanCallOnFunctionExit.cpp2
-rw-r--r--lldb/source/Target/ThreadPlanCallUserExpression.cpp2
-rw-r--r--lldb/source/Target/ThreadPlanPython.cpp2
-rw-r--r--lldb/source/Target/ThreadPlanStack.cpp22
13 files changed, 51 insertions, 49 deletions
diff --git a/lldb/source/API/SBThread.cpp b/lldb/source/API/SBThread.cpp
index e0ab8b2..8d5b6f2 100644
--- a/lldb/source/API/SBThread.cpp
+++ b/lldb/source/API/SBThread.cpp
@@ -513,10 +513,10 @@ SBError SBThread::ResumeNewPlan(ExecutionContext &exe_ctx,
return sb_error;
}
- // User level plans should be Master Plans so they can be interrupted, other
- // plans executed, and then a "continue" will resume the plan.
+ // User level plans should be Controlling Plans so they can be interrupted,
+ // other plans executed, and then a "continue" will resume the plan.
if (new_plan != nullptr) {
- new_plan->SetIsMasterPlan(true);
+ new_plan->SetIsControllingPlan(true);
new_plan->SetOkayToDiscard(false);
}
diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp
index e9396dc..71e67f6 100644
--- a/lldb/source/Commands/CommandObjectThread.cpp
+++ b/lldb/source/Commands/CommandObjectThread.cpp
@@ -526,12 +526,12 @@ protected:
return false;
}
- // If we got a new plan, then set it to be a master plan (User level Plans
- // should be master plans so that they can be interruptible). Then resume
- // the process.
+ // If we got a new plan, then set it to be a controlling plan (User level
+ // Plans should be controlling plans so that they can be interruptible).
+ // Then resume the process.
if (new_plan_sp) {
- new_plan_sp->SetIsMasterPlan(true);
+ new_plan_sp->SetIsControllingPlan(true);
new_plan_sp->SetOkayToDiscard(false);
if (m_options.m_step_count > 1) {
@@ -1021,11 +1021,12 @@ protected:
abort_other_plans, &address_list.front(), address_list.size(),
m_options.m_stop_others, m_options.m_frame_idx, new_plan_status);
if (new_plan_sp) {
- // User level plans should be master plans so they can be interrupted
+ // User level plans should be controlling plans so they can be
+ // interrupted
// (e.g. by hitting a breakpoint) and other plans executed by the
// user (stepping around the breakpoint) and then a "continue" will
// resume the original plan.
- new_plan_sp->SetIsMasterPlan(true);
+ new_plan_sp->SetIsControllingPlan(true);
new_plan_sp->SetOkayToDiscard(false);
} else {
result.SetError(new_plan_status);
diff --git a/lldb/source/Expression/FunctionCaller.cpp b/lldb/source/Expression/FunctionCaller.cpp
index 5f1eb24..5f34675 100644
--- a/lldb/source/Expression/FunctionCaller.cpp
+++ b/lldb/source/Expression/FunctionCaller.cpp
@@ -254,7 +254,7 @@ lldb::ThreadPlanSP FunctionCaller::GetThreadPlanToCallFunction(
lldb::ThreadPlanSP new_plan_sp(new ThreadPlanCallFunction(
*thread, wrapper_address, CompilerType(), args, options));
- new_plan_sp->SetIsMasterPlan(true);
+ new_plan_sp->SetIsControllingPlan(true);
new_plan_sp->SetOkayToDiscard(false);
return new_plan_sp;
}
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 1ae8228..388d47b 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -4526,7 +4526,8 @@ void Process::SettingsInitialize() { Thread::SettingsInitialize(); }
void Process::SettingsTerminate() { Thread::SettingsTerminate(); }
namespace {
-// RestorePlanState is used to record the "is private", "is master" and "okay
+// RestorePlanState is used to record the "is private", "is controlling" and
+// "okay
// to discard" fields of the plan we are running, and reset it on Clean or on
// destruction. It will only reset the state once, so you can call Clean and
// then monkey with the state and it won't get reset on you again.
@@ -4537,7 +4538,7 @@ public:
: m_thread_plan_sp(thread_plan_sp), m_already_reset(false) {
if (m_thread_plan_sp) {
m_private = m_thread_plan_sp->GetPrivate();
- m_is_master = m_thread_plan_sp->IsMasterPlan();
+ m_is_controlling = m_thread_plan_sp->IsControllingPlan();
m_okay_to_discard = m_thread_plan_sp->OkayToDiscard();
}
}
@@ -4548,7 +4549,7 @@ public:
if (!m_already_reset && m_thread_plan_sp) {
m_already_reset = true;
m_thread_plan_sp->SetPrivate(m_private);
- m_thread_plan_sp->SetIsMasterPlan(m_is_master);
+ m_thread_plan_sp->SetIsControllingPlan(m_is_controlling);
m_thread_plan_sp->SetOkayToDiscard(m_okay_to_discard);
}
}
@@ -4557,7 +4558,7 @@ private:
lldb::ThreadPlanSP m_thread_plan_sp;
bool m_already_reset;
bool m_private;
- bool m_is_master;
+ bool m_is_controlling;
bool m_okay_to_discard;
};
} // anonymous namespace
@@ -4708,11 +4709,11 @@ Process::RunThreadPlan(ExecutionContext &exe_ctx,
thread_plan_sp->SetPrivate(false);
- // The plans run with RunThreadPlan also need to be terminal master plans or
- // when they are done we will end up asking the plan above us whether we
+ // The plans run with RunThreadPlan also need to be terminal controlling plans
+ // or when they are done we will end up asking the plan above us whether we
// should stop, which may give the wrong answer.
- thread_plan_sp->SetIsMasterPlan(true);
+ thread_plan_sp->SetIsControllingPlan(true);
thread_plan_sp->SetOkayToDiscard(false);
// If we are running some utility expression for LLDB, we now have to mark
diff --git a/lldb/source/Target/StopInfo.cpp b/lldb/source/Target/StopInfo.cpp
index ef7dff4..1de281b 100644
--- a/lldb/source/Target/StopInfo.cpp
+++ b/lldb/source/Target/StopInfo.cpp
@@ -764,7 +764,7 @@ protected:
true, // stop_other_threads
new_plan_status));
if (new_plan_sp && new_plan_status.Success()) {
- new_plan_sp->SetIsMasterPlan(true);
+ new_plan_sp->SetIsControllingPlan(true);
new_plan_sp->SetOkayToDiscard(false);
new_plan_sp->SetPrivate(true);
}
diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp
index da6a444..1b32331 100644
--- a/lldb/source/Target/Thread.cpp
+++ b/lldb/source/Target/Thread.cpp
@@ -844,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;
@@ -882,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;
}
@@ -905,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.
@@ -1214,7 +1214,7 @@ void Thread::DiscardThreadPlans(bool force) {
GetPlans().DiscardAllPlans();
return;
}
- GetPlans().DiscardConsultingMasterPlans();
+ GetPlans().DiscardConsultingControllingPlans();
}
Status Thread::UnwindInnermostExpression() {
@@ -1914,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???
@@ -1947,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???
@@ -1971,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???
diff --git a/lldb/source/Target/ThreadPlan.cpp b/lldb/source/Target/ThreadPlan.cpp
index b996cb1..3b42831 100644
--- a/lldb/source/Target/ThreadPlan.cpp
+++ b/lldb/source/Target/ThreadPlan.cpp
@@ -26,8 +26,8 @@ ThreadPlan::ThreadPlan(ThreadPlanKind kind, const char *name, Thread &thread,
m_takes_iteration_count(false), m_could_not_resolve_hw_bp(false),
m_thread(&thread), m_kind(kind), m_name(name), m_plan_complete_mutex(),
m_cached_plan_explains_stop(eLazyBoolCalculate), m_plan_complete(false),
- m_plan_private(false), m_okay_to_discard(true), m_is_master_plan(false),
- m_plan_succeeded(true) {
+ m_plan_private(false), m_okay_to_discard(true),
+ m_is_controlling_plan(false), m_plan_succeeded(true) {
SetID(GetNextID());
}
@@ -152,7 +152,7 @@ void ThreadPlan::DidPush() {}
void ThreadPlan::DidPop() {}
bool ThreadPlan::OkayToDiscard() {
- return IsMasterPlan() ? m_okay_to_discard : true;
+ return IsControllingPlan() ? m_okay_to_discard : true;
}
lldb::StateType ThreadPlan::RunState() {
diff --git a/lldb/source/Target/ThreadPlanBase.cpp b/lldb/source/Target/ThreadPlanBase.cpp
index c6c4d97..46ae9c3 100644
--- a/lldb/source/Target/ThreadPlanBase.cpp
+++ b/lldb/source/Target/ThreadPlanBase.cpp
@@ -40,7 +40,7 @@ ThreadPlanBase::ThreadPlanBase(Thread &thread)
#endif
new_tracer_sp->EnableTracing(thread.GetTraceEnabledState());
SetThreadPlanTracer(new_tracer_sp);
- SetIsMasterPlan(true);
+ SetIsControllingPlan(true);
}
ThreadPlanBase::~ThreadPlanBase() = default;
@@ -90,8 +90,8 @@ bool ThreadPlanBase::ShouldStop(Event *event_ptr) {
case eStopReasonWatchpoint:
if (stop_info_sp->ShouldStopSynchronous(event_ptr)) {
// If we are going to stop for a breakpoint, then unship the other
- // plans at this point. Don't force the discard, however, so Master
- // plans can stay in place if they want to.
+ // plans at this point. Don't force the discard, however, so
+ // Controlling plans can stay in place if they want to.
LLDB_LOGF(
log,
"Base plan discarding thread plans for thread tid = 0x%4.4" PRIx64
diff --git a/lldb/source/Target/ThreadPlanCallFunction.cpp b/lldb/source/Target/ThreadPlanCallFunction.cpp
index 08efc43..0336a9d 100644
--- a/lldb/source/Target/ThreadPlanCallFunction.cpp
+++ b/lldb/source/Target/ThreadPlanCallFunction.cpp
@@ -33,7 +33,7 @@ using namespace lldb_private;
bool ThreadPlanCallFunction::ConstructorSetup(
Thread &thread, ABI *&abi, lldb::addr_t &start_load_addr,
lldb::addr_t &function_load_addr) {
- SetIsMasterPlan(true);
+ SetIsControllingPlan(true);
SetOkayToDiscard(false);
SetPrivate(true);
diff --git a/lldb/source/Target/ThreadPlanCallOnFunctionExit.cpp b/lldb/source/Target/ThreadPlanCallOnFunctionExit.cpp
index 7471e9b..4bccf96 100644
--- a/lldb/source/Target/ThreadPlanCallOnFunctionExit.cpp
+++ b/lldb/source/Target/ThreadPlanCallOnFunctionExit.cpp
@@ -18,7 +18,7 @@ ThreadPlanCallOnFunctionExit::ThreadPlanCallOnFunctionExit(
),
m_callback(callback) {
// We are not a user-generated plan.
- SetIsMasterPlan(false);
+ SetIsControllingPlan(false);
}
void ThreadPlanCallOnFunctionExit::DidPush() {
diff --git a/lldb/source/Target/ThreadPlanCallUserExpression.cpp b/lldb/source/Target/ThreadPlanCallUserExpression.cpp
index 513d599..d833a4d 100644
--- a/lldb/source/Target/ThreadPlanCallUserExpression.cpp
+++ b/lldb/source/Target/ThreadPlanCallUserExpression.cpp
@@ -39,7 +39,7 @@ ThreadPlanCallUserExpression::ThreadPlanCallUserExpression(
m_user_expression_sp(user_expression_sp) {
// User expressions are generally "User generated" so we should set them up
// to stop when done.
- SetIsMasterPlan(true);
+ SetIsControllingPlan(true);
SetOkayToDiscard(false);
}
diff --git a/lldb/source/Target/ThreadPlanPython.cpp b/lldb/source/Target/ThreadPlanPython.cpp
index e83f0e9..cd63d28 100644
--- a/lldb/source/Target/ThreadPlanPython.cpp
+++ b/lldb/source/Target/ThreadPlanPython.cpp
@@ -31,7 +31,7 @@ ThreadPlanPython::ThreadPlanPython(Thread &thread, const char *class_name,
eVoteNoOpinion, eVoteNoOpinion),
m_class_name(class_name), m_args_data(args_data), m_did_push(false),
m_stop_others(false) {
- SetIsMasterPlan(true);
+ SetIsControllingPlan(true);
SetOkayToDiscard(true);
SetPrivate(false);
}
diff --git a/lldb/source/Target/ThreadPlanStack.cpp b/lldb/source/Target/ThreadPlanStack.cpp
index c5ee0834..f09583c 100644
--- a/lldb/source/Target/ThreadPlanStack.cpp
+++ b/lldb/source/Target/ThreadPlanStack.cpp
@@ -213,35 +213,35 @@ void ThreadPlanStack::DiscardAllPlans() {
return;
}
-void ThreadPlanStack::DiscardConsultingMasterPlans() {
+void ThreadPlanStack::DiscardConsultingControllingPlans() {
std::lock_guard<std::recursive_mutex> guard(m_stack_mutex);
while (true) {
- int master_plan_idx;
+ int controlling_plan_idx;
bool discard = true;
- // Find the first master plan, see if it wants discarding, and if yes
+ // Find the first controlling plan, see if it wants discarding, and if yes
// discard up to it.
- for (master_plan_idx = m_plans.size() - 1; master_plan_idx >= 0;
- master_plan_idx--) {
- if (m_plans[master_plan_idx]->IsMasterPlan()) {
- discard = m_plans[master_plan_idx]->OkayToDiscard();
+ for (controlling_plan_idx = m_plans.size() - 1; controlling_plan_idx >= 0;
+ controlling_plan_idx--) {
+ if (m_plans[controlling_plan_idx]->IsControllingPlan()) {
+ discard = m_plans[controlling_plan_idx]->OkayToDiscard();
break;
}
}
- // If the master plan doesn't want to get discarded, then we're done.
+ // If the controlling plan doesn't want to get discarded, then we're done.
if (!discard)
return;
// First pop all the dependent plans:
- for (int i = m_plans.size() - 1; i > master_plan_idx; i--) {
+ for (int i = m_plans.size() - 1; i > controlling_plan_idx; i--) {
DiscardPlan();
}
- // Now discard the master plan itself.
+ // Now discard the controlling plan itself.
// The bottom-most plan never gets discarded. "OkayToDiscard" for it
// means discard it's dependent plans, but not it...
- if (master_plan_idx > 0) {
+ if (controlling_plan_idx > 0) {
DiscardPlan();
}
}