[Lldb-commits] [PATCH] D76470: [lldb/Target] Rework the way the inferior environment is created

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 20 17:22:55 PDT 2020


jingham added a comment.

Except for the suggestion to use eCommandRequiresTarget for the new command, this looks good.



================
Comment at: lldb/source/Commands/CommandObjectTarget.cpp:690
+            interpreter, "target show-launch-environment",
+            "Shows the environemtn being passed to the target at launch, "
+            "taking info account 3 settings: target.env-vars, "
----------------
"passed to the process when launched"

might be clearer.


================
Comment at: lldb/source/Commands/CommandObjectTarget.cpp:693
+            "target.inherit-env and target.unset-env-vars.",
+            nullptr) {}
+
----------------
If you pass eCommandRequiresTarget to the optional last argument here, then you don't have to check in the DoExecute, and you will get consistent error reporting. 


================
Comment at: lldb/source/Commands/CommandObjectTarget.cpp:701
+
+    if (!target) {
+      result.AppendError("no target\n");
----------------
Pass eCommandRequiresTarget when you make the command and you can omit this checking.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76470





More information about the lldb-commits mailing list