From: Thomas Schwinge <thomas@codesourcery.com>
To: <samuel.thibault@gnu.org>
Cc: Joel Brobecker <brobecker@adacore.com>,
<gdb-patches@sourceware.org>, <bug-hurd@gnu.org>
Subject: Re: [PATCH,HURD] Fix reading core
Date: Tue, 30 Apr 2013 12:02:00 -0000 [thread overview]
Message-ID: <8761z4v033.fsf@kepler.schwinge.homeip.net> (raw)
In-Reply-To: <20130409234117.GC24389@adacore.com>
[-- Attachment #1: Type: text/plain, Size: 2059 bytes --]
Hi!
On Tue, 9 Apr 2013 16:41:17 -0700, Joel Brobecker <brobecker@adacore.com> wrote:
> > 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.
> >
> > * 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,
<http://git.savannah.gnu.org/cgit/hurd/hurd.git/commit/?id=c48e6ec36da97d514488f88fa4b9c268fd0d6284>,
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)
> > };
> >
> > +/* 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[] =
> > +{
> > + CREG_OFFSET (EAX), CREG_OFFSET (ECX), CREG_OFFSET (EDX), CREG_OFFSET (EBX),
> > + CREG_OFFSET (UESP), CREG_OFFSET (EBP), CREG_OFFSET (ESI), CREG_OFFSET (EDI),
> > + CREG_OFFSET (EIP), CREG_OFFSET (EFL), CREG_OFFSET (CS), CREG_OFFSET (SS),
> > + CREG_OFFSET (DS), CREG_OFFSET (ES), CREG_OFFSET (FS), CREG_OFFSET (GS)
> > +};
>
> 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üße,
Thomas
[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]
prev parent reply other threads:[~2013-04-30 9:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-11 2:01 Samuel Thibault
2013-04-10 11:33 ` Joel Brobecker
2013-04-11 2:44 ` Thomas Schwinge
2013-04-11 3:55 ` Samuel Thibault
2013-04-11 14:08 ` Thomas Schwinge
2013-04-26 17:50 ` Samuel Thibault
2013-04-26 19:02 ` Joel Brobecker
2013-04-26 19:03 ` Alfred M. Szmidt
2013-04-30 12:02 ` Thomas Schwinge [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8761z4v033.fsf@kepler.schwinge.homeip.net \
--to=thomas@codesourcery.com \
--cc=brobecker@adacore.com \
--cc=bug-hurd@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=samuel.thibault@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox