how to print map value in gdb

Posted by Davit Siradeghyan on Stack Overflow See other posts from Stack Overflow or by Davit Siradeghyan
Published on 2010-04-21T12:56:56Z Indexed on 2010/04/21 13:03 UTC
Read the original article Hit count: 572

Filed under:
|
|
|
|

Hi all

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

© Stack Overflow or respective owner

Related posts about gdb

Related posts about linux