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]

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...


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