Inside STL queues, etc...
Posted: Thu Nov 06, 2008 11:06 pm
How can I look inside a queue/vector/etc. inside the debugger? Is it not possible to look in local variables and see what objects (and relevant data) are inside a container?
Thanks for the responses, eranif, sdolim. That looks good! Is it possible to use it in CodeLite?sdolim wrote:This looks like a more recent attempt:
http://www.yolinux.com/TUTORIALS/src/db ... s-1.03.txt
Works with g++ 4.3.
Example of use here:
http://www.yolinux.com/TUTORIALS/GDB-Commands.html
Scroll down to "De-Referencing STL Containers".
Well, it does, for me at least.namnori wrote:I also have another question: auto-complete (in a class, for example) only seems to work for variables in the local scope. If I have a variable as part of a class (which should be global within the class) and try to access it in a method, auto-complete doesn't seem to work?
Right now I think you would have to use it manually. Source the script in your .gdbinit file, and use the gdb console in the Output pane to enter the commands yourself. Eran can correct me if I'm wrong.namnori wrote:That looks good! Is it possible to use it in CodeLite?