aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
diff options
context:
space:
mode:
authorFred Riss <friss@apple.com>2020-03-19 18:02:05 -0700
committerFred Riss <friss@apple.com>2020-03-23 07:58:34 -0700
commitb4a6e63ea12309bf667d1569a20ec5b081cbf2a4 (patch)
tree0d404d414f989bdc8ea0a653969b222863d5f54e /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
parentcd7b45057ca9bc72b99a0abc6c9be25e0f72fbcf (diff)
downloadllvm-b4a6e63ea12309bf667d1569a20ec5b081cbf2a4.zip
llvm-b4a6e63ea12309bf667d1569a20ec5b081cbf2a4.tar.gz
llvm-b4a6e63ea12309bf667d1569a20ec5b081cbf2a4.tar.bz2
[lldb/Target] Rework the way the inferior environment is created
Summary: The interactions between the environment settings (`target.env-vars`, `target.inherit-env`) and the inferior life-cycle are non-obvious today. For example, if `target.inherit-env` is set, the `target.env-vars` setting will be augmented with the contents of the host environment the first time the launch environment is queried (usually at launch). After that point, toggling `target.inherit-env` will have no effect as there's no tracking of what comes from the host and what is a user setting. This patch computes the environment every time it is queried rather than updating the contents of the `target.env-vars` property. This means that toggling the `target.inherit-env` property later will now have the intended effect. This patch also adds a `target.unset-env-vars` settings that one can use to remove variables from the launch environment. Using this, you can inherit all but a few of the host environment. The way the launch environment is constructed is: 1/ if `target.inherit-env` is set, then read the host environment into the launch environment. 2/ Remove for the environment the variables listed in `target.unset-env`. 3/ Augment the launch environment with the contents of `target.env-vars`. This overrides any common values with the host environment. The one functional difference here that could be seen as a regression is that `target.env-vars` will not contain the inferior environment after launch. The patch implements a better alternative in the `target show-launch-environment` command which will return the environment computed through the above rules. Reviewers: labath, jingham Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D76470
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h')
0 files changed, 0 insertions, 0 deletions