What do gdb users here think about its capabilities in regards to debugging code with templates and STL?
Do you use any tricks to make the debugging any simpler? Perhaps some Python scripts? Or are you satisfied the way it is at present in gdb (ver 6.x, haven't tried 7.x yet)?
Thanks.
My favorite way to use GDB is GDB mode in emacs. You get full visual/source level debugging, thread window, stack window (etc)... Try it out, you won't be disappointed.
That said, GDB handles debugging of STL containers just fine with no special add ons... Just make sure you're building WITH -g, and without -ON (of any kind)...
I am assuming that you mean visualizing STL code better (and not the debug mode which give safe iterators and additional runtime checks). I am not sure if you have looked at these posts:
Also, try using KDevelop/DDD if possible -- they do help.
I am not sure if you are allowed to add code, or you are just debugging the code, Sorry. I wrote a simple utility functions since a while, I hope you find it useful. You could print the contents of standard containers easily. There is no platform specific code, an example of usage(the test-driver actually):
I haven't wrote the code for Boost containers yet. Hopefully, I'll do it sometime :)
All what you have to do, is to include this file["streamer.hpp"]:
ddd is great too -- my favorite!
This may be of help: GDB STL Support Tools