public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: [OB] extract the signal number by WTERMSIG
Date: Wed, 01 Sep 2010 16:14:00 -0000	[thread overview]
Message-ID: <4C7E7BE9.4040006@codesourcery.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 192 bytes --]

Hi,
We should use WTERMSIG to extract the signal number from a WIFSIGNALED
status, not WSTOPSIG.

It is obvious, OK to apply?

-- 
Yao Qi
CodeSourcery
yao@codesourcery.com
(650) 331-3385 x739

[-- Attachment #2: wtermsig.patch --]
[-- Type: text/x-patch, Size: 728 bytes --]

2010-09-02  Yao Qi  <yao@codesourcery.com>

	* linux-nat.c (status_to_str): Use WTERMSIG to extract the signal
	number from a WIFSIGNALED status.

Index: linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/linux-nat.c,v
retrieving revision 1.182
diff -u -p -r1.182 linux-nat.c
--- linux-nat.c	31 Aug 2010 18:08:43 -0000	1.182
+++ linux-nat.c	1 Sep 2010 16:04:23 -0000
@@ -1094,7 +1094,7 @@ status_to_str (int status)
     }
   else if (WIFSIGNALED (status))
     snprintf (buf, sizeof (buf), "%s (terminated)",
-	      strsignal (WSTOPSIG (status)));
+	      strsignal (WTERMSIG (status)));
   else
     snprintf (buf, sizeof (buf), "%d (exited)", WEXITSTATUS (status));
 

             reply	other threads:[~2010-09-01 16:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-01 16:14 Yao Qi [this message]
2010-09-01 16:47 ` Pedro Alves
2010-09-02  4:55   ` Yao Qi

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=4C7E7BE9.4040006@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).