[Lldb-commits] [PATCH] D107869: [LLDB][GUI] Add Process Launch form

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 11 15:16:47 PDT 2021


jingham added a comment.

In D107869#2940428 <https://reviews.llvm.org/D107869#2940428>, @clayborg wrote:

> In D107869#2940016 <https://reviews.llvm.org/D107869#2940016>, @OmarEmaraDev wrote:
>
>> @jingham I wasn't arguing that we should remove those environment variables, on the contrary. Greg was suggesting that we populate the environment field with the target environment instead of implicitly adding them to the environment of the launch info. The problem with that is that there is a large number of environments that gets added (15 in my case) as shown in the following screenshot. What I was saying in my comment above is that I don't think we should show those to the user, we should transparently add them instead and let the user add additional variables as needed. We can then look into adding other settings to exclude them if necessary.
>
> I was actually suggesting only priming the env var list with what was contained in the "target.env-vars" setting. This doesn't include the extra env vars that are inherited. Just the ones that the user explicitly set. That defaults to nothing usually. If we go this way, then we should add a new boolean for inheriting the env vars that defaults to the current value of "target.inherit-env"

I think it would be confusing to have a window called "Environment Variables" that has a checkbox that says "Inherit Environment" and when I check or uncheck that checkbox the "Environment Variables" pane contents doesn't change.  We had this same confusion internally and in command-line lldb for quite a while, but that was causing confusion and we sorted that all out a year or so ago.  We shouldn't replicate this confusion in the UI.

There's some consistency in having a pane in the Launch Parameters that allows you to add "User-Specified Environment Variables" as well as a checkbox to inherit the environment.  After all, you can't edit the environment variables you inherit other than by overriding them or unsetting them with the unset-env-vars setting.  So this would be a consistent set of editable parameters.  But it needs to be clear what this is actually displaying.

It would still be nice if the UI gave a way to see the resultant target environment.  Maybe a "show inherited env-vars" control to go along with the "inherit-env" checkbox?  But it's not terrible if I have to go out to the console to see that.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107869



More information about the lldb-commits mailing list