From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20247 invoked by alias); 14 Jun 2013 08:59:55 -0000 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 Received: (qmail 20235 invoked by uid 89); 14 Jun 2013 08:59:54 -0000 X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,MSGID_MULTIPLE_AT autolearn=no version=3.3.1 Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.201.45) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 14 Jun 2013 08:59:53 +0000 Received: from md14.u-strasbg.fr (md14.u-strasbg.fr [130.79.200.249]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id r5E8xk7u024291 ; Fri, 14 Jun 2013 10:59:47 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from ms15.u-strasbg.fr (ms15.u-strasbg.fr [130.79.204.115]) by md14.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id r5E8xkHf008759 ; Fri, 14 Jun 2013 10:59:46 +0200 Received: from E6510Muller (gw-ics.u-strasbg.fr [130.79.210.225]) (Authenticated sender: mullerp) by ms15.u-strasbg.fr (Postfix) with ESMTPSA id 5C9731FD88; Fri, 14 Jun 2013 10:59:45 +0200 (CEST) From: "Pierre Muller" To: "'Sergio Durigan Junior'" , "'GDB Patches'" References: In-Reply-To: Subject: RE: [RFC/PATCH] Add new internal variable $_signo Date: Fri, 14 Jun 2013 09:37:00 -0000 Message-ID: <002801ce68dd$845cd2e0$8d1678a0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-SW-Source: 2013-06/txt/msg00326.txt.bz2 Is it that I didn't understand the patch correctly or do you use the GDB signal number in infrun.c while you use the native signal integer value in the corelow.c case? Aren't those two values sometimes different? Wouldn't it be more consistent to only use the GDB internal number? In fact, this "inconsistency" is not specific to your patch, the siggy from corelow.c is printed out, while other signals are always first converted to GDB enum values before being printed (and apparently not in integer form but using the gdb_signal_to_name function. Shouldn't we use gdb_signal_to_name (sig) in core_open and set $_signo also to sig? Pierre Proposed patch (untested...) Should I submit it independently or is there a specific reason to print the numeric value of the signal for core dumps while we seem to use signal names elsewhere? 2013-06-14 Pierre Muller * corelow.c (core_open): Use GDB signal name instead of raw signal value. Index: corelow.c =================================================================== RCS file: /cvs/src/src/gdb/corelow.c,v retrieving revision 1.132 diff -u -p -r1.132 corelow.c --- corelow.c 15 May 2013 12:26:14 -0000 1.132 +++ corelow.c 14 Jun 2013 08:56:08 -0000 @@ -445,7 +445,7 @@ core_open (char *filename, int from_tty) : gdb_signal_from_host (siggy)); printf_filtered (_("Program terminated with signal %s, %s.\n"), - siggy, gdb_signal_to_string (sig)); + gdb_signal_to_name (sig), gdb_signal_to_string (sig)); } /* Fetch all registers from core file. */