2 Commits

Author SHA1 Message Date
Adrian Prantl
94819cc7b1
[LLDB] Modify CreateValueObjectFrom* to take an ExecutionContext (#185547)
Currently these functions take a target pointer. In Cross-language
projects this means it's down to chance what typesystem the resulting
value will be in, since the implementation returns the first scratch
type system in the target, which depends on the order of images and
their implementation language.

By passing in an execution context the selected frame is used to
determine the typesystem, which is usually the expected outcome when
using DIL.

This should be entirely NFC for Clang-only LLDBs, but is a necessity for
LLDBs with additional type system plugins such as the Swift plugin.

Assisted by Claude to patch the call sites.
2026-03-12 16:08:04 -07:00
Nerixyz
d18f6d086e
[lldb] Limit formatter-section extractor range (#140139)
The formatter extraction would look at too much data for one type -
possibly reading data outside the section.
This PR limits the size of the `DataExtractor` to the one specified in
the record size before - previously, the whole section was looked at.
Similarly, `ForEachFormatterInModule` skipped zero-bytes but didn't stop
when reaching the end of the extractor.

I added a test for both cases.
2026-02-12 19:40:40 +01:00