This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch] gdbserver: print correct child exit status/signal
- From: "Nathan J. Williams" <nathanw at wasabisystems dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: 01 Mar 2004 16:15:18 -0500
- Subject: [patch] gdbserver: print correct child exit status/signal
- Organization: Wasabi Systems, Inc.
Something else I had in my tree. Gdbserver was printing exit statuses
and termination signals from a variable that contained the in-protocol
signal from a command, if anything.
- Nathan
2004-03-01 Nathan J. Williams <nathanw@wasabisystems.com>
* server.c (main): Print child status or termination signal from
variable 'signal', not 'sig'.
Index: server.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/server.c,v
retrieving revision 1.20
diff -u -p -r1.20 server.c
--- server.c 29 Feb 2004 16:49:38 -0000 1.20
+++ server.c 1 Mar 2004 21:14:23 -0000
@@ -571,9 +573,10 @@ main (int argc, char *argv[])
if (status == 'W')
fprintf (stderr,
- "\nChild exited with status %d\n", sig);
+ "\nChild exited with status %d\n", signal);
if (status == 'X')
- fprintf (stderr, "\nChild terminated with signal = 0x%x\n", sig);
+ fprintf (stderr, "\nChild terminated with signal = 0x%x\n",
+ signal);
if (status == 'W' || status == 'X')
{
if (extended_protocol)