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



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

Reply via email to