This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[OB] extract the signal number by WTERMSIG


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]