[Lldb-commits] [PATCH] D113019: [lldb][NFC] Inclusive Language: rename master plan to primary plan

2021-11-02 Thread Quinn Pham via Phabricator via lldb-commits
quinnp added a comment.

In D113019#3103511 , @jingham wrote:

> I have no problem with adopting more inclusive language, but "Primary" 
> doesn't express the right concept.  The "master" plan is one that coordinates 
> other plans.  There can be many "master plans" on the stack at any one time 
> during a complex set of stepping operations, each distinguished in that it is 
> in charge of the plans that it enqueued.  So it isn't Primary in a real sense.

Absolutely, thank you for the feedback! I went with "Controlling".


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113019/new/

https://reviews.llvm.org/D113019

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D113019: [lldb][NFC] Inclusive Language: rename master plan to primary plan

2021-11-02 Thread Quinn Pham via Phabricator via lldb-commits
quinnp updated this revision to Diff 384202.
quinnp added a comment.

Addressing feedback. Changing Primary to Controlling.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113019/new/

https://reviews.llvm.org/D113019

Files:
  lldb/docs/use/python-reference.rst
  lldb/include/lldb/Target/Thread.h
  lldb/include/lldb/Target/ThreadPlan.h
  lldb/include/lldb/Target/ThreadPlanStack.h
  lldb/source/API/SBThread.cpp
  lldb/source/Commands/CommandObjectThread.cpp
  lldb/source/Expression/FunctionCaller.cpp
  lldb/source/Target/Process.cpp
  lldb/source/Target/StopInfo.cpp
  lldb/source/Target/Thread.cpp
  lldb/source/Target/ThreadPlan.cpp
  lldb/source/Target/ThreadPlanBase.cpp
  lldb/source/Target/ThreadPlanCallFunction.cpp
  lldb/source/Target/ThreadPlanCallOnFunctionExit.cpp
  lldb/source/Target/ThreadPlanCallUserExpression.cpp
  lldb/source/Target/ThreadPlanPython.cpp
  lldb/source/Target/ThreadPlanStack.cpp

Index: lldb/source/Target/ThreadPlanStack.cpp
===
--- lldb/source/Target/ThreadPlanStack.cpp
+++ lldb/source/Target/ThreadPlanStack.cpp
@@ -213,35 +213,35 @@
   return;
 }
 
-void ThreadPlanStack::DiscardConsultingMasterPlans() {
+void ThreadPlanStack::DiscardConsultingControllingPlans() {
   std::lock_guard 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();
 }
   }
Index: lldb/source/Target/ThreadPlanPython.cpp
===
--- lldb/source/Target/ThreadPlanPython.cpp
+++ lldb/source/Target/ThreadPlanPython.cpp
@@ -31,7 +31,7 @@
  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);
 }
Index: lldb/source/Target/ThreadPlanCallUserExpression.cpp
===
--- lldb/source/Target/ThreadPlanCallUserExpression.cpp
+++ lldb/source/Target/ThreadPlanCallUserExpression.cpp
@@ -39,7 +39,7 @@
   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);
 }
 
Index: lldb/source/Target/ThreadPlanCallOnFunctionExit.cpp
===
--- lldb/source/Target/ThreadPlanCallOnFunctionExit.cpp
+++ lldb/source/Target/ThreadPlanCallOnFunctionExit.cpp
@@ -18,7 +18,7 @@
  ),
   m_callback(callback) {
   // We are not a user-generated plan.
-  SetIsMasterPlan(false);
+  SetIsControllingPlan(false);
 }
 
 void ThreadPlanCallOnFunctionExit::DidPush() {
Index: lldb/source/Target/ThreadPlanCallFunction.cpp
===
--- lldb/source/Target/ThreadPlanCallFunction.cpp
+++ lldb/source/Target/ThreadPlanCallFunction.cpp
@@ -33,7 +33,7 @@
 bool ThreadPlanCallFunction::ConstructorSetup(
 Thread , ABI *, lldb::addr_t _load_addr,
 lldb::addr_t _load_addr) {
-  SetIsMasterPlan(true);
+  SetIsControllingPlan(true);
   SetOkayToDiscard(false);
   SetPrivate(true);
 
Index: lldb/source/Target/ThreadPlanBase.cpp
===
--- lldb/source/Target/ThreadPlanBase.cpp
+++ lldb/source/Target/ThreadPlanBase.cpp

[Lldb-commits] [PATCH] D113019: [lldb][NFC] Inclusive Language: rename master plan to primary plan

2021-11-02 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment.

Or Coordinating?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113019/new/

https://reviews.llvm.org/D113019

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D113019: [lldb][NFC] Inclusive Language: rename master plan to primary plan

2021-11-02 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment.

Maybe "Controlling" plan would be better?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113019/new/

https://reviews.llvm.org/D113019

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D113019: [lldb][NFC] Inclusive Language: rename master plan to primary plan

2021-11-02 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment.

I have no problem with adopting more inclusive language, but "Primary" doesn't 
express the right concept.  The "master" plan is one that coordinates other 
plans.  There can be many "master plans" on the stack at any one time during a 
complex set of stepping operations, each distinguished in that it is in charge 
of the plans that it enqueued.  So it isn't Primary in a real sense.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113019/new/

https://reviews.llvm.org/D113019

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D113019: [lldb][NFC] Inclusive Language: rename master plan to primary plan

2021-11-02 Thread Quinn Pham via Phabricator via lldb-commits
quinnp created this revision.
quinnp requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

[NFC] As part of using inclusive language within the llvm project, this patch
renames master plan to primary plan in lldb.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113019

Files:
  lldb/docs/use/python-reference.rst
  lldb/include/lldb/Target/Thread.h
  lldb/include/lldb/Target/ThreadPlan.h
  lldb/include/lldb/Target/ThreadPlanStack.h
  lldb/source/API/SBThread.cpp
  lldb/source/Commands/CommandObjectThread.cpp
  lldb/source/Expression/FunctionCaller.cpp
  lldb/source/Target/Process.cpp
  lldb/source/Target/StopInfo.cpp
  lldb/source/Target/Thread.cpp
  lldb/source/Target/ThreadPlan.cpp
  lldb/source/Target/ThreadPlanBase.cpp
  lldb/source/Target/ThreadPlanCallFunction.cpp
  lldb/source/Target/ThreadPlanCallOnFunctionExit.cpp
  lldb/source/Target/ThreadPlanCallUserExpression.cpp
  lldb/source/Target/ThreadPlanPython.cpp
  lldb/source/Target/ThreadPlanStack.cpp

Index: lldb/source/Target/ThreadPlanStack.cpp
===
--- lldb/source/Target/ThreadPlanStack.cpp
+++ lldb/source/Target/ThreadPlanStack.cpp
@@ -213,35 +213,35 @@
   return;
 }
 
-void ThreadPlanStack::DiscardConsultingMasterPlans() {
+void ThreadPlanStack::DiscardConsultingPrimaryPlans() {
   std::lock_guard guard(m_stack_mutex);
   while (true) {
-int master_plan_idx;
+int primary_plan_idx;
 bool discard = true;
 
-// Find the first master plan, see if it wants discarding, and if yes
+// Find the first primary 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 (primary_plan_idx = m_plans.size() - 1; primary_plan_idx >= 0;
+ primary_plan_idx--) {
+  if (m_plans[primary_plan_idx]->IsPrimaryPlan()) {
+discard = m_plans[primary_plan_idx]->OkayToDiscard();
 break;
   }
 }
 
-// If the master plan doesn't want to get discarded, then we're done.
+// If the primary 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 > primary_plan_idx; i--) {
   DiscardPlan();
 }
 
-// Now discard the master plan itself.
+// Now discard the primary 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 (primary_plan_idx > 0) {
   DiscardPlan();
 }
   }
Index: lldb/source/Target/ThreadPlanPython.cpp
===
--- lldb/source/Target/ThreadPlanPython.cpp
+++ lldb/source/Target/ThreadPlanPython.cpp
@@ -31,7 +31,7 @@
  eVoteNoOpinion, eVoteNoOpinion),
   m_class_name(class_name), m_args_data(args_data), m_did_push(false),
   m_stop_others(false) {
-  SetIsMasterPlan(true);
+  SetIsPrimaryPlan(true);
   SetOkayToDiscard(true);
   SetPrivate(false);
 }
Index: lldb/source/Target/ThreadPlanCallUserExpression.cpp
===
--- lldb/source/Target/ThreadPlanCallUserExpression.cpp
+++ lldb/source/Target/ThreadPlanCallUserExpression.cpp
@@ -39,7 +39,7 @@
   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);
+  SetIsPrimaryPlan(true);
   SetOkayToDiscard(false);
 }
 
Index: lldb/source/Target/ThreadPlanCallOnFunctionExit.cpp
===
--- lldb/source/Target/ThreadPlanCallOnFunctionExit.cpp
+++ lldb/source/Target/ThreadPlanCallOnFunctionExit.cpp
@@ -18,7 +18,7 @@
  ),
   m_callback(callback) {
   // We are not a user-generated plan.
-  SetIsMasterPlan(false);
+  SetIsPrimaryPlan(false);
 }
 
 void ThreadPlanCallOnFunctionExit::DidPush() {
Index: lldb/source/Target/ThreadPlanCallFunction.cpp
===
--- lldb/source/Target/ThreadPlanCallFunction.cpp
+++ lldb/source/Target/ThreadPlanCallFunction.cpp
@@ -33,7 +33,7 @@
 bool ThreadPlanCallFunction::ConstructorSetup(
 Thread , ABI *, lldb::addr_t _load_addr,
 lldb::addr_t _load_addr) {
-  SetIsMasterPlan(true);
+  SetIsPrimaryPlan(true);
   SetOkayToDiscard(false);
   SetPrivate(true);
 
Index: lldb/source/Target/ThreadPlanBase.cpp
===
--- lldb/source/Target/ThreadPlanBase.cpp
+++