It seems that gdb has not been reliable for about a decade. I have been using various workarounds and hacks to avoid the problems. I have to juggle which version of gdb to use to succeed for a particular debugging task. Fortunately, the --readnow option can help in some of those circumstances even with the tremendous overhead. However, gdb can still get confused and unresponsive. So, in the end, my question is quite simple: Which version of gdb should I use for the best chance of reliability? As a side question, do the developers of gdb ever use gdb to debug gdb? As additional questions, do the developers of gdb ever debug code that use C++ or DSOs? Do the developers ever look at examples that are larger than 10K? (To answer a potential response question, yes I am getting a bit fed up. And if I am getting fed up, there are many more that have given up on gdb being a useful tool.)
The first question is so open ended that it's impossible to answer in any detail. For one, I have no idea what exactly you mean by "reliable". But obviously the general answer should be "the latest version". GDB is constantly improving. For the rest of the questions, "yes to all". > do the developers of gdb ever use gdb to debug gdb? Of course. > do the developers of gdb ever debug code that use C++ Yes. GDB is a C++11 program now [1], so we're dogfooding C++ nowadays. A few problems became more evident, but none that we didn't know about already. We have two major projects going on to improve C++ debugging. One is using G++ for C++ expression evaluation, via the "compile" command. The G++ side is going to be in GCC 7, and the GDB side is being prepared for submission. The other is improving the linespec parser and symbol search so that it becomes possible to set breakpoints on functions with gdb ignoring namespaces. I can point you at testing branches for all of this if you're interested in helping out. The wiki has pointers to these and other ongoing projects. > or DSOs? Yes, of course. Specific suggestions on what should be improved are welcome. > Do the developers ever look at examples that are larger than 10K? Yes. We know of houses that have many users that load huge programs into GDB. Some even employ GDB maintainers. We have tests in our testsuite to exercise some use cases with representative "huge" programs. There's a lot of scope for improvement, of course. > (To answer a potential response question, yes I am getting a bit fed up. And > if I am getting fed up, there are many more that have given up on gdb being a > useful tool.) I'm sorry to hear that. [1] https://sourceware.org/gdb/wiki/cxx-conversion
Hi there! I'd like to stress that I'd really appreciate specific suggestions for what sort of issues impact you the most, and learn more about your use cases. Filing a bug for each specific issue with a reproducer would be ideal. But please feel free to send me email offlist too. I'm always interested in hearing from our users. I have thick skin so feel free to say what you're really thinking. :-) As for this bug, I don't think there's anything else we can do here, so I'm closing it. Thanks for your input.