clayborg added a comment.

I would either add the option to SBLaunchInfo so it can be specified, or 
execute the command. If the target is created, it is setting a target specific 
setting. If had to pick I would add the API to SBLaunchInfo. Whenever I see 
something that can't be done through the API, I like to add that API if it is 
warranted. In our case the value in the SBLaunchInfo should probably be stored 
as a lldb_private::LazyBool which can have the following values:

  enum LazyBool { eLazyBoolCalculate = -1, eLazyBoolNo = 0, eLazyBoolYes = 1 };

It would eLazyBoolCalculate to in the launch info, and if it gets set to true 
or false, then we use that, if it is set to eLazyBoolCalculate we use the 
target setting.



================
Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:1359
   const auto debuggerRoot = GetString(arguments, "debuggerRoot");
+  bool launchWithDebuggerEnvironment =
+      GetBoolean(arguments, "inheritEnvironment", false);
----------------
All other local variables use the same name, can we rename this to 
"inheritEnvironment"?


================
Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:1380
+  // "inheritEnvironment" argument.
+  if (!launchWithDebuggerEnvironment)
+    g_vsc.RunLLDBCommands(llvm::StringRef(),
----------------
The other option here would be to add "inheritEnvironment" to the SBLaunchInfo?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74636



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

Reply via email to