[Lldb-commits] [PATCH] D74636: [lldb-vscode] Add inheritEnvironment option

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 23 01:06:15 PDT 2020


labath added a comment.

In D74636#1934466 <https://reviews.llvm.org/D74636#1934466>, @wallace wrote:

> I added some tests cases to show why I used "settings set target.inherit-env".
>
> There are currently two ways to launch a process. Either with the plain "program" argument,
>  or with the "launchCommands" argument. The latter is assumed to create a target by executing
>  arbitrary commands, which may go through CommandObjectProcess.
>
> As by default target.inherit-env is true, if we first set its value to what we got from the 
>  inheritEnvironment argument, then both kinds of launchers would behave the same way.


Thanks for the explanation. That makes sort of sense, but it does raise the question of the handling of other launch command arguments. What happens if the user specifies the environment (`env`) in the launch command, but uses the `launchCommands` method of launching? Will that environment still be applied? And what about the rest of the launch arguments (disable-aslr, stop-on-entry, disable-stdio)? It seems odd to have this special treatment for only a single property.

> I haven't found an API for changing this setting, so I ended up invoking the command.

Yeah, I'm afraid we don't have an API for getting/setting settings right now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74636





More information about the lldb-commits mailing list