From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23336 invoked by alias); 30 Apr 2013 09:28:58 -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 23327 invoked by uid 89); 30 Apr 2013 09:28:57 -0000 X-Spam-SWARE-Status: No, score=-7.7 required=5.0 tests=AWL,BAYES_00,KHOP_PGP_SIGNED,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 30 Apr 2013 09:28:56 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1UX6rm-0004nl-3J from Thomas_Schwinge@mentor.com ; Tue, 30 Apr 2013 02:28:54 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 30 Apr 2013 02:28:54 -0700 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.2.247.3; Tue, 30 Apr 2013 10:28:52 +0100 From: Thomas Schwinge To: CC: Joel Brobecker , , Subject: Re: [PATCH,HURD] Fix reading core In-Reply-To: <20130409234117.GC24389@adacore.com> References: <20130211020109.GK5926@type.youpi.perso.aquilenet.fr> <20130409234117.GC24389@adacore.com> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/23.4.1 (i486-pc-linux-gnu) Date: Tue, 30 Apr 2013 12:02:00 -0000 Message-ID: <8761z4v033.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Virus-Found: No X-SW-Source: 2013-04/txt/msg00895.txt.bz2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 2036 Hi! On Tue, 9 Apr 2013 16:41:17 -0700, Joel Brobecker w= rote: > > The i386 GNU/Hurd ELF core format actually follows the uaccess gregset_t > > array format, not the Mach thread state format. This fixes gdb reading > > it. > >=20 > > * gdb/i386gnu-nat.c (CREG_OFFSET): New macro. > > (creg_offset): New array. > > (CREG_ADDR): Use creg_offset instead of reg_offset. In context with the related Hurd patch, , I have now reviewed, tested, and committed this patch. > Do you have write access to the GDB repository? Samuel asked me to commit it on his behalf (and likewise his other patch, once reviewed). > do you have > copyright assignment papers on file? This has been completed. > > --- a/gdb/i386gnu-nat.c.original 2013-02-11 00:46:02.000000000 +0000 > > +++ b/gdb/i386gnu-nat.c 2013-02-11 00:48:09.000000000 +0000 > > @@ -56,8 +56,21 @@ > > REG_OFFSET (ds), REG_OFFSET (es), REG_OFFSET (fs), REG_OFFSET (gs) > > }; > >=20=20 > > +/* Offset to the greg_t location where REG is stored. */ > > +#define CREG_OFFSET(reg) (REG_##reg * 4) > > + > > +/* At CREG_OFFSET[N] is the offset to the greg_t location where > > + the GDB register N is stored. */ > > +static int creg_offset[] =3D > > +{ > > + CREG_OFFSET (EAX), CREG_OFFSET (ECX), CREG_OFFSET (EDX), CREG_OFFSET= (EBX), > > + CREG_OFFSET (UESP), CREG_OFFSET (EBP), CREG_OFFSET (ESI), CREG_OFFSE= T (EDI), > > + CREG_OFFSET (EIP), CREG_OFFSET (EFL), CREG_OFFSET (CS), CREG_OFFSET = (SS), > > + CREG_OFFSET (DS), CREG_OFFSET (ES), CREG_OFFSET (FS), CREG_OFFSET (G= S) > > +}; >=20 > Unless it was done on purpose, we try to limit the size of lines > to 70 characters, only extending it to up to 80 when it makes > a difference.... I left this as is; the idea is to keep it visually comparable to the reg_offset definition just above (same sequence of registers; see the first line of the patch's context). Gr=C3=BC=C3=9Fe, Thomas --=-=-= Content-Type: application/pgp-signature Content-length: 489 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQEcBAEBAgAGBQJRf47QAAoJEGe3hdm9kOiiibsIAOMDLmdio+YId0Ww7Ns50QSA BXrh2MS+Md1jcAGfcOkXsQq8gV0m2sah7nk1ew4bE61RMDlld7edCDGyB1o6ktIt 9kVONecGgvRzkDq8m/MR/ie68bfacKJPSOLVeLQIp5mZOrJALpnioMlp5iYTn8J4 vd7eD3P3nWdN0WEjrMh0t6sAKJe/6+EpQJ6HFNIKiawmU0CloztHSttrc07FKnoK EZvksRNe37UFfuYGXOg2fNb4/w9yjRWyRsxrdoMwnGY9smjiEYSBMRBH35krc4J0 LLgmiVfRqq+FpxFTPXppiOKmMvp1cWE+BvPsqodjNFfpYGYmpZyhISzUMkQHWf8= =bpdd -----END PGP SIGNATURE----- --=-=-=--