Files
Dave Lee b6a56c4665 [lldb] Call SetSyntheticChildrenGenerated on GetSyntheticChildAtOffset (#198859)
Follow up to #197311 and based on the feedback on that PR.

One way a Python synthetic formatter can construct a child is with
`SBValue::GetSyntheticChildAtOffset`. However those values were are not
marked as having been generated by `SyntheticChildren`. This means the
previous PR (#197311) did not apply to them as would be expected. The
fix is to call `SetSyntheticChildrenGenerated(true)` on the child values
created in `GetSyntheticChildAtOffset`.

Assisted-by: claude (tests and review)
2026-05-21 20:49:25 +00:00

23 lines
310 B
C++

#include <vector>
struct Child {
int x;
};
struct Parent {
Child child;
};
struct MyContainer {
int *data;
unsigned count;
};
int main() {
Parent parent = {{1}};
std::vector<int> vec = {10, 20, 30};
int arr[] = {100, 200, 300};
MyContainer container = {arr, 3};
return 0; // break here
}