how to print std::map value in gdb


how to print std::map value in gdb



I have a std::map< std::string, std::string> cont;

I want to see cont[ "some_key" ] in gdb. When I'm trying

p cont[ "some_ket" ]

I'm getting this message: One of the arguments you tried to pass to operator[] could not be converted to what the function wants.

I'm using GNU gdb Red Hat Linux (6.3.0.0-1.162.el4rh). Thanks


Use OpenBSD's malloc, realloc and free in my program

1:

Strange results while measuring delta time on Linux
The latest gdb has python support baked in so one could easily write a function to print out the contents of any stl structure. Java OutOfMemoryError due to Linux RAM disk cache not freed However you'd have to learn the API and write the script. Spring ResourceServlet throws too many open files exception in jetty and tomcat under linux Luckily gcc 4.5 will ship with the needed python scripts to receive gdb to intelligently handle stl data structures.. compile with -ansi -pedantic -Wall switches automatically with gcc EDIT: you don't have to wait for GCC 4.5 (which by the way has already been released), you must just grab the code from SVN.. bluetooth application devlopment
C++ man pages in Ubuntuhow to make PHP lists all Linux Users?

2:

You must write your own dump functions and call them:.
(gdb) call dump(m) 
see this thread: http://www.mail-archive.com/help-gplusplus@gnu.org/msg02109.html. I'm curious around the GDB helper macros..

3:

Gdb doesn't understand C++ operator overloading..


50 out of 100 based on 55 user ratings 610 reviews