This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Print STL Containers
- From: Parker James E Contr AFRL/HEDR <James dot Parker dot ctr at brooks dot af dot mil>
- To: "'gdb at sources dot redhat dot com'" <gdb at sources dot redhat dot com>
- Date: Mon, 12 Sep 2005 20:27:16 -0500
- Subject: Print STL Containers
I would like to print the contents of C++ STL Containers using gdb.
I compiled my code with -D_GLIBCXX_DEBUG and it provides some help examining
the containers.
also the command
gdb> p *( foo_iterator->_M_current)
prints the structure, but I can't seem to dereference the nodes in a list.
Any help would be appreciated.
I apologize if this is trivial, but I'm not having any luck finding an
answer in the old forum posts...