Bug 235598 - Provide feedback when gdb crashes
Summary: Provide feedback when gdb crashes
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: CPP Debugger (show other bugs)
Version: 3.10.2
Platform: Compiled Sources Linux
: HI wishlist
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-28 06:37 UTC by Dima Ryazanov
Modified: 2011-12-30 19:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dima Ryazanov 2010-04-28 06:37:21 UTC
Version:           3.10.2 (using KDE 4.4.2)
OS:                Linux
Installed from:    Compiled From Sources

GDB keeps crashing when I try to debug my program. Of course this should never happen, but it would be nice if KDevelop displayed a message when GDB exits unexpectedly (with a non-zero exit code, etc.). Currently, it acts the same as when the program being debugged exited.

If possible, KDevelop should also kill the program being debugged - otherwise, it keeps running on its own, without GDB.
Comment 1 Andreas Pakulat 2010-04-28 08:43:31 UTC
The part about 'kill the program' probably won't happen as we might not know the process id and hence don't know which app to kill.
Comment 2 Niko Sams 2010-04-28 19:25:04 UTC
I had the same issue with an unstable CVS build of gdb - we should implement such a error message.

Are you sure the debugee keeps running? If it was attached to a process, yes - but if started using gdb?
Comment 3 Dima Ryazanov 2010-04-28 19:28:35 UTC
Yes, it keeps running even if started by gdb.
You can try it yourself: start some program in gdb, then run "killall -SIGSEGV gdb". gdb exits, but the program stays running.
Comment 4 Nicolás Alvarez 2010-05-13 04:52:29 UTC
I can confirm this.

I was debugging kdevelop itself, and gdb kept crashing in a particular place. I think it's when I moved mouse over a certain variable in the "outer" kdevelop instance, the pretty-printing made gdb segfault (I tried attaching gdb to gdb (!) and making it crash, and I could see Python symbols in the backtrace, at least most of the times).

When that happened, the "outer" kdevelop went back to the Code area as if the program finished, but the debugged instance of kdevelop kept running normally. The first time I was quite confused about what happened.

If a message appeared somewhere saying gdb unexpectedly quit (and that the debugee may be still running), I think it would be enough to avoid that confusion. AFAIk it's also possible to recognize if the quit was due to SIGSEGV, and show a message saying in no uncertain terms that gdb *crashed*. I don't think it's absolutely necessary for kdevelop to kill the debugee.
Comment 5 Niko Sams 2011-12-30 19:45:21 UTC
Git commit 0335f87e6f553c68f43133216f66e0612c661a3e by Niko Sams.
Committed on 30/12/2011 at 20:45.
Pushed by nsams into branch '4.3'.

show error message explaining that gdb crashed

this should help getting better bug reports and people knowing it's not our fault
that the debug session ended

M  +7    -0    debuggers/gdb/gdb.cpp

http://commits.kde.org/kdevelop/0335f87e6f553c68f43133216f66e0612c661a3e