I’m using Eclipse, and when I debug, the values of the list variables are unreadable and cryptic. How can I see those values?
I’m on Linux.
I’m using Eclipse, and when I debug, the values of the list variables are
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
GDB 7 has support for python scripting which can be used to write pretty printers. For STL, the pretty printers need to understand the details of the implementation, so the pretty printers definitions must be supplied as part the standard library implementation.
For libstdc++, you can get a copy of the pretty printers from here, though you probably want to track down the specific version of that file that matches your particular libstdc++ version.
You will need to do some work to educate your copy of GDB about this file, probably via the gdb ‘source’ command, but once you have convinced GDB to load it you should be able to pretty print many STL data structures, std::list included.