This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

but

(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:
 >
 >         [1,2,3]

Does this work for programs compiled by any compiler, or just gcc?

-- 
Nick                                           http://www.inet.net.nz/~nickrob


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]