From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14129 invoked by alias); 1 Sep 2010 16:14:55 -0000 Received: (qmail 14114 invoked by uid 22791); 1 Sep 2010 16:14:53 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 01 Sep 2010 16:14:49 +0000 Received: (qmail 25755 invoked from network); 1 Sep 2010 16:14:47 -0000 Received: from unknown (HELO ?192.168.0.101?) (yao@127.0.0.2) by mail.codesourcery.com with ESMTPA; 1 Sep 2010 16:14:47 -0000 Message-ID: <4C7E7BE9.4040006@codesourcery.com> Date: Wed, 01 Sep 2010 16:14:00 -0000 From: Yao Qi User-Agent: Thunderbird 2.0.0.24 (X11/20100411) MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: [OB] extract the signal number by WTERMSIG Content-Type: multipart/mixed; boundary="------------050803070407020906050501" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-09/txt/msg00015.txt.bz2 This is a multi-part message in MIME format. --------------050803070407020906050501 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 192 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 --------------050803070407020906050501 Content-Type: text/x-patch; name="wtermsig.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="wtermsig.patch" Content-length: 728 2010-09-02 Yao Qi * 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)); --------------050803070407020906050501--