Re: Variable objects and STL containers

Daniel Jacobowitz
2008-02-05T13:18:26Z

On Tue, Feb 05, 2008 at 12:31:07PM +0100, Mark Kettenis wrote:
> > We discussed using Python scripting for that; in fact, I have a patch locally
> > that will make
> >
> > -var-evaluate-expression V
> >
> > for a vector print something like:
> >
> > [1,2,3]
> >
> > I'm working on making those element the children of the variable object,
> > but it's not done yet.
>
> Still this means that you'll need to write python code for each and
> every STL implementation, and play catchup whenever the implementation
> is changed. I guess the only way to get this to work is to connvince
> the GCC people to maintain the python code together with libstdc++.

Right. That's what I would like to happen; and since GCC is both a
GNU project and widely used with GDB, I think it will be easy to
convince them. I envision these scripts going in
/usr/share/gdb/packages or something similar to that.

--
Daniel Jacobowitz
CodeSourcery