[all-commits] [llvm/llvm-project] 284c1a: [LLDB] Enable SBTypeSynthetic manipulation for SBV...
David Mentler via All-commits
all-commits at lists.llvm.org
Fri Jul 17 14:18:19 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 284c1a166af4c7deab55c7de2ee1bd480d44e9ff
https://github.com/llvm/llvm-project/commit/284c1a166af4c7deab55c7de2ee1bd480d44e9ff
Author: David Mentler <mentlerd at gmail.com>
Date: 2026-07-17 (Fri, 17 Jul 2026)
Changed paths:
M lldb/docs/use/variable.md
M lldb/include/lldb/API/SBValue.h
M lldb/include/lldb/DataFormatters/TypeSynthetic.h
M lldb/include/lldb/ValueObject/ValueObject.h
M lldb/include/lldb/ValueObject/ValueObjectSynthetic.h
M lldb/source/API/SBValue.cpp
M lldb/source/DataFormatters/TypeSynthetic.cpp
M lldb/source/ValueObject/ValueObject.cpp
M lldb/source/ValueObject/ValueObjectSynthetic.cpp
A lldb/test/API/python_api/sbvalue_set_type_synthetic/Makefile
A lldb/test/API/python_api/sbvalue_set_type_synthetic/TestSBValueSetTypeSynthetic.py
A lldb/test/API/python_api/sbvalue_set_type_synthetic/library_support.py
A lldb/test/API/python_api/sbvalue_set_type_synthetic/main.cpp
A lldb/test/API/python_api/sbvalue_set_type_synthetic_override/Makefile
A lldb/test/API/python_api/sbvalue_set_type_synthetic_override/TestSBValueSetTypeSyntheticOverride.py
A lldb/test/API/python_api/sbvalue_set_type_synthetic_override/foo_bar_synths.py
A lldb/test/API/python_api/sbvalue_set_type_synthetic_override/main.cpp
Log Message:
-----------
[LLDB] Enable SBTypeSynthetic manipulation for SBValue instances (#209056)
Allow manipulating the scripted synthetic children frontend selection
process for individual `SBValue` instances.
The motivating use-case is supporting custom data structures, type
erasure systems, and facilitating debugging handle based C APIs. Below
is an example of such a use-case of an anonymized 3rd party C library:
```C
using ErrorCode = int;
using Handle = void*;
using FooHandle = Handle;
using BarHandle = Handle;
struct ArrayOfHandles {
int size;
Handle* data;
};
struct AllHandles {
ArrayOfHandles foos;
ArrayOfHandles bars;
};
ErrorCode GetAllHandles(AllHandles* into);
```
The current LLDB feature-set allows attaching a synthetic children
provider to `AllHandles`, but the scripted frontend has no chance to
select an appropriate alternative frontend implementation class for
`foos` and `bars` based on type information it is aware of.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list