🍒 [lldb][Expression] Allow specifying a preferred ModuleList for lookup during expression evaluation #10312
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
TestMemoryHistory.py
/TestReportData.py
are currently failing onthe x86 macOS CI (started after we upgraded the Xcode SDK on that
machien). The LLDB ASAN utility expression is failing to run with
following error:
The reason for this is that the system sanitizer dylib and the locally
built libclang_rt contain the same symbol
__asan_get_alloc_stack
, anddepending on the order in which they're loaded, we may pick the one from
the wrong dylib (this probably changed during the buildbot upgrade and
is why it only now started failing). Based on discussion with @wrotki we
always want to pick the one that's in the libclang_rt dylib if it was
loaded, and libsystem_sanitizers otherwise.
This patch addresses this by adding a "preferred lookup context list" to
the expression evaluator. Currently this is only exposed in the
EvaluateExpressionOptions
. We make it aSymbolContextList
in case wewant the lookup contexts to be contexts other than modules (e.g., source
files, etc.). In
IRExecutionUnit
we make it aModuleList
because itmakes the symbol lookup implementation simpler and we only do module
lookups here anyway. If we ever need it to be a
SymbolContext
, thattransformation shouldn't be too difficult.
(cherry picked from commit 542d52b)
rdar://144997976