From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11606 invoked by alias); 29 Jan 2008 17:00:44 -0000 Received: (qmail 11594 invoked by uid 22791); 29 Jan 2008 17:00:43 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 29 Jan 2008 17:00:18 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id AB5A198234; Tue, 29 Jan 2008 17:00:16 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 41B769811F; Tue, 29 Jan 2008 17:00:16 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1JJtol-0000j8-7B; Tue, 29 Jan 2008 12:00:15 -0500 Date: Tue, 29 Jan 2008 17:02:00 -0000 From: Daniel Jacobowitz To: Aleksandar Ristovski Cc: gdb-patches@sourceware.org, Ryan Mansfield Subject: Re: PR 2343 fix: signal number mismatch Message-ID: <20080129170015.GC1637@caradoc.them.org> Mail-Followup-To: Aleksandar Ristovski , gdb-patches@sourceware.org, Ryan Mansfield References: <3518719F06577C4F85DA618E3C37AB910DA17A41@nimbus.ott.qnx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3518719F06577C4F85DA618E3C37AB910DA17A41@nimbus.ott.qnx.com> User-Agent: Mutt/1.5.17 (2007-12-11) 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: 2008-01/txt/msg00690.txt.bz2 On Thu, Dec 13, 2007 at 11:11:58AM -0500, Aleksandar Ristovski wrote: > Hello, > > This patch fixes PR 2343: when host and target system OS differ, there can > be mismatch between signal numeric values. This patch introduces new gdbarch > function to allow different targets define their own mapping to enum > target_signal. > > ChangeLog: > > 2007-12-13 Aleksandar Ristovski > > * gdbarch.h: (gdbarch_target_signal_from_target_p): New function. > (gdbarch_target_signal_from_target_ftype): New typedef. > (gdbarch_target_signal_from_target): New function. > (set_gdbarch_target_signal_from_target): New function. > * gdbarch.c: (struct gdbarch): New field - > target_signal_from_target. > (struct gdbarch startup_gdbarch): Initialization for the new field. > (verify_gdbarch): Added comment, 'Skip verify...'. > (gdbarch_dump): Printing debug info for the new field. > (gdbarch_target_signal_from_target_p): New function definition. > (gdbarch_target_signal_from_target_ftype): New typedef definition. > (gdbarch_target_signal_from_target): New function definition. > (set_gdbarch_target_signal_from_target): New function definition. > * corelow.c: (core_open): Added logic for calling new function if > specified. gdbarch.h and gdbarch.c are generated files (see the big comment at the top of them). You need to add the new function to the list in gdbarch.sh instead. The old comment: /* NOTE: target_signal_from_host() converts a target signal value into gdb's internal signal value. Unfortunately gdb's internal value is called ``target_signal'' and this function got the name ..._from_host(). */ should go above the call to target_signal_from_host in one branch of the if statement, I think. -- Daniel Jacobowitz CodeSourcery