[Lldb-commits] [PATCH] D76470: [lldb/Target] Rework the way the inferior environment is created
Jim Ingham via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Mar 20 10:17:19 PDT 2020
jingham added a comment.
Is there any command-based way to see the entire environment that a process will get when it launches? By populating target.env-vars with the inherited environment there was a way to mostly do that, but I don't see that anymore. It seems a shame not to be able to see that...
Also, it does seem weird to me that unset-env-vars would override setting a target.env-var explicitly. What I'm likely to do is say: environment variable 'PUT_HERE_TO_ANNOY_JIM' is always getting set, and I don't want it to be when I'm debugging, so I put:
settings set target.unset-env-vars PUT_HERE_TO_ANNOY_JIM
in my .lldbinit and then after a couple month of debugging happiness, I forget that I put it there.
Then for some reason in a debugging session I want to set it. So I do:
(lldb) env PUT_HERE_TO_ANNOY_JIM="Okay, This One Time..."
But then when I run my process, it doesn't get set. Now I have to go back and remember that I had done the unset thing...
It really seems to me the automatic unsets should happen before the explicit sets. And given the only way you get anything before the automatic sets is the inherited environment, it doesn't make sense to me to apply the unsets if inherit is off.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76470/new/
https://reviews.llvm.org/D76470
More information about the lldb-commits
mailing list