Version: 3.10.2 (using KDE 4.4.2)
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.
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.
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?
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.
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.
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