Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Nathan J. Williams" <nathanw@wasabisystems.com>
To: gdb-patches@sources.redhat.com
Subject: [patch] gdbserver: print correct child exit status/signal
Date: Mon, 01 Mar 2004 21:15:00 -0000	[thread overview]
Message-ID: <mtuekscs1zt.fsf@contents-vnder-pressvre.mit.edu> (raw)
Message-ID: <20040301211500.1Yq1Cn3yzEucl3bs1pR579TyQ7CSjuyOFavGkREAxng@z> (raw)


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)


             reply	other threads:[~2004-03-01 21:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-19  0:09 Nathan J. Williams [this message]
2004-03-01 21:15 ` Nathan J. Williams
2004-03-05  3:01 ` Daniel Jacobowitz
2004-03-19  0:09   ` Daniel Jacobowitz
2004-03-05  3:48     ` Daniel Jacobowitz
2004-03-19  0:09   ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mtuekscs1zt.fsf@contents-vnder-pressvre.mit.edu \
    --to=nathanw@wasabisystems.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox