Re: GDB capabilities for exploring STL classes



"Dmitry Chumack" <saint.d.a@xxxxxxxxx> writes:

I often use gdb to debug my programs under linux. But I can't obtain
all information that I want to know about some program's data. For
example for STL stream classes gdb emits such message "<incomplete
type>".

You'll need to build g++ from source, or obtain libstdc++-debug
package for your distribution.

Or how can see the contents of vector or list classes without
some "magic" and annoying enormous type conversion statements?

This may help:
http://www.stanford.edu/~afn/gdb_stl_utils/

How can
I get information about all internals of stl classes?

Most of the time you *don't* want all internals.

When you do, just print the object of the type you are interested
in. With the exception of streams, gdb will usually print more than
you want.

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
.