I’m relatively new to programming on Gnu/Linux, so forgive me if I seem impertinent, but what the heck is up with some of the tools available? Specifically, I’m talking about GDB and the lack of C++/STL support.
You know what would be nice? If I could look into the contents of a vector or list from the debugger. Maybe even change a value here or there. But no. GDB, which is past v6.0 now, has no support for such constructs. You’ll have to write very complicated print statements if you want to see the value of just one element. Simple views of STL containers are not possible otherwise. People periodically post to the GDB mailing list about this issue, but no one ever responds to them. There are bugs in the GDB bug database that have been there for years with no one assigned to them.
It seems that no one is even talking about adding such features to GDB. There is no real mention of this problem in their errata list, and so I am not even sure if these kinds of features will ever be introduced by the developers.
I did find gdb_stl_utils, but it didn’t seem to work in my initial tests. When trying to view a vector, I got the following:
Vector Element 0: History has not yet reached $1
Is there a better debugger out there? I found Zero, but it has a strange license agreement at this time. Still, it might be worth a look if it can make debugging C++ programs easier.
Are there open source debuggers out there that would allow me to see the data in STL containers without tediously following almost endless pointers? Am I doomed to use std::cout and std::cerr, requiring changes to the source of my code and any libraries that make use of the STL? Is GDB really the state of the art for Gnu/Linux debuggers?
On the plus side, if it gets frustrating enough, I suppose I could always hire a programmer to make the changes to GDB for me. It worked for Evolution, after all.