[patch] gdbserver: print correct child exit status/signal

Nathan J. Williams
2004-03-01T21:15:21Z

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)