This is the mail archive of the
mailing list for the GDB project.
Re: Variable objects and STL containers
> > 2) _M_impl, _M_start are gcc internals and I guess they could change (like
> > CLI!) Is it meaningful to ask on the gcc list for a formal interface
> > to these details?
> Technically, there is formal interface, called iterators, provided by the
> C++ standard. I don't have the slightest confidence in gdb not falling over
> if you try to use them, though.
Are iterators available to GDB, or just the executable? I only seem able to
access those methods which are used by my program, e.g.,
(gdb) p v.size ()
$3 = 3
(gdb) p v.rbegin ()
Cannot evaluate function -- may be inlined
> 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:
Does this work for programs compiled by any compiler, or just gcc?