From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15330 invoked by alias); 14 May 2012 18:16:50 -0000 Received: (qmail 15319 invoked by uid 22791); 14 May 2012 18:16:49 -0000 X-SWARE-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-qa0-f48.google.com (HELO mail-qa0-f48.google.com) (209.85.216.48) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 May 2012 18:16:36 +0000 Received: by qady23 with SMTP id y23so4131694qad.14 for ; Mon, 14 May 2012 11:16:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.182.194 with SMTP id cd2mr1467707qab.83.1337019396053; Mon, 14 May 2012 11:16:36 -0700 (PDT) Received: by 10.229.169.130 with HTTP; Mon, 14 May 2012 11:16:36 -0700 (PDT) In-Reply-To: <20120514181113.GN10253@adacore.com> References: <20120514180146.GA18462@intel.com> <20120514181113.GN10253@adacore.com> Date: Mon, 14 May 2012 18:16:00 -0000 Message-ID: Subject: Re: PATCH: Set size of long/ptr as well as sp/pc for x32 From: "H.J. Lu" To: Joel Brobecker Cc: GDB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2012-05/txt/msg00533.txt.bz2 On Mon, May 14, 2012 at 11:11 AM, Joel Brobecker wr= ote: >> =A0{ >> + =A0struct gdbarch_tdep *tdep =3D gdbarch_tdep (gdbarch); >> =A0 =A0amd64_linux_init_abi (info, gdbarch, tdesc_x32_linux, > > I cannot approve the patch, but I noticed that you forgot to add > an empty line after the last local variable declaration. > > -- > Joel Here is the updated patch. Thanks. --=20 H.J. -- * amd64-linux-tdep.c (amd64_ilp32_linux_init_abi): Set long and ptr to 32 bits. Set sp_regnum_from_eax to AMD64_RSP_REGNUM and pc_regnum_from_eax to AMD64_RIP_REGNUM. diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c index d0c6f8f..0348cde 100644 --- a/gdb/amd64-linux-tdep.c +++ b/gdb/amd64-linux-tdep.c @@ -1572,8 +1572,14 @@ static void amd64_ilp32_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) { + struct gdbarch_tdep *tdep =3D gdbarch_tdep (gdbarch); + amd64_linux_init_abi (info, gdbarch, tdesc_x32_linux, svr4_ilp32_fetch_link_map_offsets); + set_gdbarch_long_bit (gdbarch, 32); + set_gdbarch_ptr_bit (gdbarch, 32); + tdep->sp_regnum_from_eax =3D AMD64_RSP_REGNUM; + tdep->pc_regnum_from_eax =3D AMD64_RIP_REGNUM; } --=20 1.7.6.5