[Lldb-commits] [lldb] [lldb] Unify the way we get the Target in CommandObject (PR #101208)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 30 10:56:21 PDT 2024
================
@@ -369,12 +369,12 @@ class CommandObject : public std::enable_shared_from_this<CommandObject> {
"currently stopped.";
}
- // This is for use in the command interpreter, when you either want the
- // selected target, or if no target is present you want to prime the dummy
- // target with entities that will be copied over to new targets.
- Target &GetSelectedOrDummyTarget(bool prefer_dummy = false);
- Target &GetSelectedTarget();
- Target &GetDummyTarget();
+ // This is for use in the command interpreter and returns the most relevant
+ // target. In order of priority, that's the target from the command object's
+ // execution context, from the interpreter's execution context, the selected
+ // target or the dummy target. This function always return the dummy target if
----------------
jimingham wrote:
always returns
not
always return
https://github.com/llvm/llvm-project/pull/101208
More information about the lldb-commits
mailing list