From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17551 invoked by alias); 8 Jul 2013 23:08:32 -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 17523 invoked by uid 89); 8 Jul 2013 23:08:27 -0000 X-Spam-SWARE-Status: No, score=-6.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 08 Jul 2013 23:08:26 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r68N8Oqm032236 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 8 Jul 2013 19:08:24 -0400 Received: from psique (ovpn-113-175.phx2.redhat.com [10.3.113.175]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r68N8LH0018938 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Mon, 8 Jul 2013 19:08:23 -0400 From: Sergio Durigan Junior To: GDB Patches Subject: Re: [ping][PATCH 00/17] Implement gdbarch_gdb_signal_to_target References: <1372664545-3947-1-git-send-email-sergiodj@redhat.com> X-URL: http://www.redhat.com Date: Mon, 08 Jul 2013 23:08:00 -0000 In-Reply-To: <1372664545-3947-1-git-send-email-sergiodj@redhat.com> (Sergio Durigan Junior's message of "Mon, 1 Jul 2013 04:42:08 -0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-07/txt/msg00238.txt.bz2 On Monday, July 01 2013, I wrote: > Hello, Ping. > This patch implements the new gdbarch method gdbarch_gdb_signal_to_target. > It will be used when one wants to convert between the internal GDB signal > representation (enum gdb_signal) and the target's representation. > > The idea of this patch came from a chat between Pedro and I on IRC, plus > the discussion of my patches to add the new $_exitsignal convenience > variable: > > > > > What I did was to investigate, on the Linux kernel, which targets shared > the signal numbers definition with x86. My approach was to make the x86 > the "de facto" implementation, and extend only the needed bits on each > arch. For the record, I used linux-3.10-rc6 as the main source of > information, always looking at > arch//include/uapi/asm/signal.h. For SIGRTMAX (which defaults > to _NSIG in most cases), I had to look at different signal-related > files, but most of them (except MIPS) were defined to 64 anyway. > > Then, with all the differences in hand, I implemented the bits on each > target. Since I obviously don't have access to all targets, I could not > compile GDB to make sure everything worked on each one of them, but I'd > be surprised if it didn't. I also am not submitting a testcase with > this patch because the gdbarch method is not being used anywhere yet; I > should send a proper testcase when I resubmit the $_exitsignal + $_signo > patches, because they will make use of the method. > > I would appreciate if you could take a look and tell me your opinions. > Most of the patches are trivial, because they share all the signal > numbers with x86. If you want to narrow your review, I'd recommend > taking a look at the patches 01, 02, and 17 (MIPS, see the message + > patch for more explanations). Also, if you intend to test the > compilation of this patch on some architecture, you will need patches > 01 and 02 to successfully compile it. > > OK to apply? Comments are welcome. > > Thanks. > > -- > Sergio > > gdb/alpha-linux-tdep.c | 89 +++++++++++++++++++++++ > gdb/amd64-linux-tdep.c | 5 ++ > gdb/arm-linux-tdep.c | 14 ++++ > gdb/avr-tdep.c | 50 +++++++++++++ > gdb/cris-tdep.c | 5 +- > gdb/gdbarch.c | 33 +++++++++ > gdb/gdbarch.h | 14 ++++ > gdb/gdbarch.sh | 9 +++ > gdb/h8300-tdep.c | 4 ++ > gdb/i386-linux-tdep.c | 5 ++ > gdb/ia64-linux-tdep.c | 2 + > gdb/linux-tdep.c | 182 +++++++++++++++++++++++++++++++++++++++++++++++ > gdb/linux-tdep.h | 3 + > gdb/m32r-linux-tdep.c | 2 + > gdb/m68klinux-tdep.c | 3 + > gdb/mips-linux-tdep.c | 132 ++++++++++++++++++++++++++++++++++ > gdb/mn10300-linux-tdep.c | 2 + > gdb/s390-tdep.c | 2 + > gdb/sparc-linux-tdep.c | 83 +++++++++++++++++++++ > gdb/xtensa-linux-tdep.c | 49 +++++++++++++ > 20 files changed, 687 insertions(+), 1 deletion(-) -- Sergio