public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [OB] extract the signal number by WTERMSIG
@ 2010-09-01 16:14 Yao Qi
  2010-09-01 16:47 ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Yao Qi @ 2010-09-01 16:14 UTC (permalink / raw)
  To: gdb-patches

[-- 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));
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [OB] extract the signal number by WTERMSIG
  2010-09-01 16:14 [OB] extract the signal number by WTERMSIG Yao Qi
@ 2010-09-01 16:47 ` Pedro Alves
  2010-09-02  4:55   ` Yao Qi
  0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2010-09-01 16:47 UTC (permalink / raw)
  To: gdb-patches; +Cc: Yao Qi

On Wednesday 01 September 2010 17:14:33, Yao Qi wrote:
> Hi,
> We should use WTERMSIG to extract the signal number from a WIFSIGNALED
> status, not WSTOPSIG.
> 
> It is obvious, OK to apply?

Go ahead, thanks.

-- 
Pedro Alves

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [OB] extract the signal number by WTERMSIG
  2010-09-01 16:47 ` Pedro Alves
@ 2010-09-02  4:55   ` Yao Qi
  0 siblings, 0 replies; 3+ messages in thread
From: Yao Qi @ 2010-09-02  4:55 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches

Pedro Alves wrote:
> On Wednesday 01 September 2010 17:14:33, Yao Qi wrote:
>> Hi,
>> We should use WTERMSIG to extract the signal number from a WIFSIGNALED
>> status, not WSTOPSIG.
>>
>> It is obvious, OK to apply?
> 
> Go ahead, thanks.
> 
Committed.
http://sourceware.org/ml/gdb-cvs/2010-09/msg00016.html

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-09-02  1:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-01 16:14 [OB] extract the signal number by WTERMSIG Yao Qi
2010-09-01 16:47 ` Pedro Alves
2010-09-02  4:55   ` Yao Qi

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).