From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2572 invoked by alias); 8 Dec 2013 19:56:20 -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 2559 invoked by uid 89); 8 Dec 2013 19:56:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,MISSING_HEADERS,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-ob0-f171.google.com Received: from Unknown (HELO mail-ob0-f171.google.com) (209.85.214.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 08 Dec 2013 19:56:19 +0000 Received: by mail-ob0-f171.google.com with SMTP id wp18so2883511obc.16 for ; Sun, 08 Dec 2013 11:56:11 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.183.3.102 with SMTP id bv6mr10361372obd.18.1386532571261; Sun, 08 Dec 2013 11:56:11 -0800 (PST) Received: by 10.76.105.174 with HTTP; Sun, 8 Dec 2013 11:56:11 -0800 (PST) In-Reply-To: <20131208194352.GA10094@intel.com> References: <20131208194352.GA10094@intel.com> Date: Sun, 08 Dec 2013 19:56:00 -0000 Message-ID: Subject: Re: [PATCH 1/3] PR gdb/16304: Properly decode MODRM byte for 64-bit From: "H.J. Lu" Cc: GDB Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2013-12/txt/msg00308.txt.bz2 On Sun, Dec 8, 2013 at 11:43 AM, H.J. Lu wrote: > 64-bit mode doesn't have 16-bit address. This patch fixes it. Tested on > Linux/x86-64. OK to install? > > H.J. > -- > 2013-12-08 H.J. Lu > > PR gdb/16304 > * i386-tdep.c (i386_record_lea_modrm_addr): Don't use 16-bit > address in 64-bit mode. > --- > gdb/i386-tdep.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c > index 597d672..4a91d80 100644 > --- a/gdb/i386-tdep.c > +++ b/gdb/i386-tdep.c > @@ -4192,9 +4192,9 @@ i386_record_lea_modrm_addr (struct i386_record_s *irp, uint64_t *addr) > ULONGEST offset64; > > *addr = 0; > - if (irp->aflag) > + if (irp->aflag || gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 64) > { We seem to check ir.regmap[X86_RECORD_R8_REGNUM] for 64-bit target. I will try that. > - /* 32 bits */ > + /* 32/64 bits */ > int havesib = 0; > uint8_t scale = 0; > uint8_t byte; > -- > 1.8.3.1 > -- H.J.