From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14270 invoked by alias); 16 Jun 2012 15:10:55 -0000 Received: (qmail 14257 invoked by uid 22791); 16 Jun 2012 15:10:54 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 16 Jun 2012 15:10:37 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id q5GFAYHM009768; Sat, 16 Jun 2012 17:10:34 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id q5GFAWkS008216; Sat, 16 Jun 2012 17:10:32 +0200 (CEST) Date: Sat, 16 Jun 2012 15:10:00 -0000 Message-Id: <201206161510.q5GFAWkS008216@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: hjl.tools@gmail.com CC: gdb-patches@sourceware.org In-reply-to: <20120613230415.GC11434@intel.com> (hongjiu.lu@intel.com) Subject: Re: [PATCH 3/5] Support x32 siginfo References: <20120613230415.GC11434@intel.com> 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: 2012-06/txt/msg00544.txt.bz2 > Date: Wed, 13 Jun 2012 16:04:15 -0700 > From: "H.J. Lu" > > Hi, > > This patch adds x32 siginfo support. It is a repost of > > http://sourceware.org/ml/gdb-patches/2012-05/msg00489.html > > OK to install? If you make the small change suggested below. > H.J. > --- > * amd64-linux-nat.c (compat_x32_clock_t): New. > (compat_x32_siginfo_t): Likewise. > (compat_x32_siginfo_from_siginfo): Likewise. > (siginfo_from_compat_x32_siginfo): Likewise. > (amd64_linux_siginfo_fixup): Call compat_x32_siginfo_from_siginfo > and siginfo_from_compat_x32_siginfo for x32. > > --- > gdb/amd64-linux-nat.c | 200 ++++++++++++++++++++++++++++++++++++++++++++++++- > 1 files changed, 199 insertions(+), 1 deletions(-) > > diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c > index ce62e2a..9c4026c 100644 > --- a/gdb/amd64-linux-nat.c > +++ b/gdb/amd64-linux-nat.c > @@ -733,9 +916,10 @@ siginfo_from_compat_siginfo (siginfo_t *to, compat_siginfo_t *from) > static int > amd64_linux_siginfo_fixup (siginfo_t *native, gdb_byte *inf, int direction) > { > + struct gdbarch *gdbarch = get_frame_arch (get_current_frame ()); Blank line here please > /* Is the inferior 32-bit? If so, then do fixup the siginfo > object. */ > - if (gdbarch_addr_bit (get_frame_arch (get_current_frame ())) == 32) > + if (gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 32)