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)
23 lines
310 B
C++
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
|
|
}
|