[Lldb-commits] [PATCH] D76009: [lldb/Target] Initialize new targets environment variables from target.env-vars
Frederic Riss via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 11 10:46:07 PDT 2020
friss created this revision.
friss added reviewers: jingham, labath.
Herald added a project: LLDB.
The TargetProperties constructor invokes a series of callbacks to
prime the properties from the default ones. The one callback in
charge of updating the inferior environment was commented out
because it crashed.
The reason for the crash is that TargetProperties is a parent class
of Target and the callbacks were invoked using a Target that was
not fully initialized. This patch moves the initial callback
invocations to a separate function that can be called at the end
the Target constructor, thus preventing the crash.
One existing test had to be modified, because the initialization of
the environment properties now take place at the time the target is
created, not at the first use of the environment (usually launch
time).
The added test checks that the LaunchInfo object returned by
the target has been primed with the values from the settings.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D76009
Files:
lldb/include/lldb/Target/Target.h
lldb/source/Target/Target.cpp
lldb/test/API/commands/settings/TestSettings.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76009.249681.patch
Type: text/x-patch
Size: 4305 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200311/6f484a6e/attachment.bin>
More information about the lldb-commits
mailing list