This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: i386 register numbering
- To: kettenis at science dot uva dot nl
- Subject: Re: i386 register numbering
- From: Eli Zaretskii <eliz at delorie dot com>
- Date: Sat, 28 Jul 2001 08:14:26 -0400
- CC: gdb at sources dot redhat dot com
- References: <200107281012.GAA02314@delorie.com> <s3izo9pnuac.fsf@soliton.wins.uva.nl>
- Reply-to: Eli Zaretskii <eliz at is dot elta dot co dot il>
> From: Mark Kettenis <kettenis@science.uva.nl>
> Date: 28 Jul 2001 13:54:19 +0200
>
> In GDB we have STAB_REG_TO_REGNUM, DWARF_REG_TO_REGNUM, etc.
Ah, I missed that additional layer of translation. Thanks for
pointing it out.
> We have
> to provide a suitable definition for those in tm-i386.h. However, the
> problem mentioned above makes it a bit tricky, since GCC always uses
> the same register numbering scheme, regardless of the actual debugging
> format. Most ELF targets use the Dwarf scheme, even if the debugging
> format is stabs. And it seems that DJGPP uses the "default" scheme,
> even if you ask for Dwarf 2 debugging info.
DJGPP supports 3 debug info formats: COFF, stabs, and (lately) DWARF2;
the default is COFF. (Btw, I don't see any COFF_REG_TO_REGNUM.) I'm
guessing that no one (including myself ;-) bothered to review the
register naming scheme when support for stabs and DWARF2 was added...
But there's something in your explanation that I don't get: if GCC
always uses the same scheme, no matter what the debug info, and since
all i386 targets use the same i386.h header which defines this scheme,
how come DJGPP can use something different than the other targets?
What am I missing?
> I'm working on a patch, and I'll try to provide some reasonable
> defaults. But most targets will have to override some of these
> defaults.
Thanks.