This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Reporting of "program no longer exists"
- From: Vladimir Prus <ghost at cs dot msu dot su>
- To: gdb at sources dot redhat dot com
- Date: Sat, 14 Oct 2006 20:33:16 +0400
- Subject: Reporting of "program no longer exists"
Hi,
suppose a program being debugged got SIGSEGV and the user for GUI frontend
tries the "next" command. Here's what happens:
(gdb) -exec-next
^running
*stopped,reason="signal-received",signal-name="SIGSEGV".....
(gdb) -exec-next
^running
Couldn't get registers: No such process.
^error,msg="Couldn't get registers: No such process."
I think this is a bit unfriendly to frontend.
(1) How can frontend disable the "next" command? Checking for "SIGSEGV" is
possible, but it a bit of a hack.
(2) After getting the second response, how can frontend understand that this
is really fatal, unfixable error? Looking at the specific text is obviously a
hack?
How about making a notion of "inferior state" and announcing changes in the
state. So, the above would become
(gdb) -exec-next
^running
*stopped,target-state="noncontinuable",
reason="signal-received",signal-name="SIGSEGV".....
(gdb) -exec-next
^running
Couldn't get registers: No such process.
^error,msg="Couldn't get registers: No such process.",target-state="dead"
?
- Volodya