Bug 21225 - Which version of gdb should I use for best reliability
Summary: Which version of gdb should I use for best reliability
Status: RESOLVED INVALID
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: 7.12
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-07 05:29 UTC by richard@wetafx.co.nz
Modified: 2017-04-26 19:24 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description richard@wetafx.co.nz 2017-03-07 05:29:36 UTC
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.)
Comment 1 Pedro Alves 2017-03-08 15:18:05 UTC
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
Comment 2 Pedro Alves 2017-04-26 19:24:23 UTC
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.