From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12956 invoked by alias); 22 Apr 2010 20:42:50 -0000 Received: (qmail 12946 invoked by uid 22791); 22 Apr 2010 20:42:48 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SARE_MSGID_LONG45,TW_EG X-Spam-Check-By: sourceware.org Received: from mail-vw0-f41.google.com (HELO mail-vw0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 22 Apr 2010 20:42:44 +0000 Received: by vws4 with SMTP id 4so2203976vws.0 for ; Thu, 22 Apr 2010 13:42:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.44.198 with HTTP; Thu, 22 Apr 2010 13:42:38 -0700 (PDT) In-Reply-To: <201004222021.o3MKLYSh017913@glazunov.sibelius.xs4all.nl> References: <20100421230929.GA11193@intel.com> <201004221948.o3MJmAnH030821@glazunov.sibelius.xs4all.nl> <201004222021.o3MKLYSh017913@glazunov.sibelius.xs4all.nl> Date: Thu, 22 Apr 2010 20:42:00 -0000 Received: by 10.220.108.205 with SMTP id g13mr7142214vcp.175.1271968959188; Thu, 22 Apr 2010 13:42:39 -0700 (PDT) Message-ID: Subject: Re: PATCH: Remove amd64_linux_gregset64_reg_offset and regmap From: "H.J. Lu" To: Mark Kettenis Cc: gdb-patches@sourceware.org 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: 2010-04/txt/msg00766.txt.bz2 On Thu, Apr 22, 2010 at 1:21 PM, Mark Kettenis wr= ote: >> Date: Thu, 22 Apr 2010 13:12:08 -0700 >> From: "H.J. Lu" >> >> On Thu, Apr 22, 2010 at 12:48 PM, Mark Kettenis wrote: >> >> Date: Wed, 21 Apr 2010 16:09:29 -0700 >> >> From: "H.J. Lu" >> >> >> >> Hi, >> >> >> >> As we have discussed, this patch removes amd64_linux_gregset64_reg_of= fset >> >> and regmap from i386/amd64 Linux targets. =A0OK to install? >> > >> > The amd64 bits are ok. =A0A small issue with the i386 bits below. >> >> diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c >> >> index d559811..35bc3bd 100644 >> >> --- a/gdb/i386-linux-nat.c >> >> +++ b/gdb/i386-linux-nat.c >> >> @@ -245,18 +228,19 @@ void >> >> =A0fill_gregset (const struct regcache *regcache, >> >> =A0 =A0 =A0 =A0 =A0 =A0 elf_gregset_t *gregsetp, int regno) >> >> =A0{ >> >> - =A0elf_greg_t *regp =3D (elf_greg_t *) gregsetp; >> >> + =A0gdb_byte *regp =3D (gdb_byte *) gregsetp; >> >> =A0 =A0int i; >> >> >> >> =A0 =A0for (i =3D 0; i < I386_NUM_GREGS; i++) >> >> =A0 =A0 =A0if (regno =3D=3D -1 || regno =3D=3D i) >> >> - =A0 =A0 =A0regcache_raw_collect (regcache, i, regp + regmap[i]); >> >> + =A0 =A0 =A0regcache_raw_collect (regcache, i, >> >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 regp + i386_linux_g= regset_reg_offset[i]); >> >> >> >> =A0 =A0if ((regno =3D=3D -1 || regno =3D=3D I386_LINUX_ORIG_EAX_REGNU= M) >> >> =A0 =A0 =A0 =A0&& I386_LINUX_ORIG_EAX_REGNUM >> >> =A0 =A0 =A0 =A0 =A0< gdbarch_num_regs (get_regcache_arch (regcache))) >> >> =A0 =A0 =A0regcache_raw_collect (regcache, I386_LINUX_ORIG_EAX_REGNUM, >> >> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 regp + ORIG_EAX); >> >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 regp + 4 * ORIG_EAX); >> > >> > I think this should use an offset from i386_linux_gregset_reg_offset[] >> > as well. >> > >> >> Like this? > > Yeah, the long line is a bit of a pity, but yes, I think that's better. > I checked it in. Thanks. --=20 H.J.