I'm trying to modify autoexp.dat to write a visualizer and I'm only partly achieving what I want. I have a class (below) where Bar1 and Bar2 are dynamically allocated arrays
class Foo
{
double* Bar1;
double* Bar2;
int size;
}
and the visualizer in the [Visualizer] section of autoexp.dat that I've come up with looks like
Foo{
children
(
#(
[size]: [$c.size],
#(
[Bar1]: #array(expr: $c.Bar1[$i], size: $c.size)
),
#(
[Bar2]: #array(expr: $c.Bar2[$i], size: $c.size)
)
)
)
}
Unfortunately, the output for this is
Foo
[size] 24
[Bar1] 1
[Bar1] 1
.
.
[Bar1] 1
[Bar2] 0
[Bar2] 0
.
.
[Bar2] 0
I would like it to show
Foo
[size] 24
[Bar1]
[0] 1
[1] 1
.
.
[23] 1
[Bar2]
[0] 0
[1] 0
.
.
[23] 0
where Bar1 and Bar2 are collapsible, but more importantly I have the indices.