This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ix86 PE/COFF DWARF register numbering (was Re: [PATCH]i386_stab_reg_to_regnum (4 <-> 5, ebp <-> esp))


On Sun, 18 Apr 2004, Eli Zaretskii wrote:

> On 05 Apr 2004 at 17:44:14 -0500 Jim Blandy wrote:
> >
> > In fact, it looks to me as if DJGPP uses dbx_register_map for both
> > STABS and Dwarf 2.  (Eli, is this right?)
>
> No, that's not what I see.  The file /config/i386/djgpp.h in the GCC
> distribution says:
>
>     #undef DBX_REGISTER_NUMBER
>     #define DBX_REGISTER_NUMBER(n) \
>       ((write_symbols == DWARF2_DEBUG) ? svr4_dbx_register_map[n] : dbx_register_map[n])

Aha!

> (This is from GCC 3.3.3 source distribution I find in the DJGPP
> repository.)

(We see in a later email that this distribution contains local patches
which have not been included in the FSF source base.  That explains the
previous confusion.)

> So DJGPP uses svr4_dbx_register_map[] for DWARF-2, dbx_register_map[]
> otherwise.

Look Jim (does this sound like a bad Star Trek episode, or what? :), yet
another target that uses a different register map depending on the output
debugging format.  And note that for DWARF 2, it uses the svr4 map, just
like every other ix86 target that I know of (except the current PE
proposal).

Now that the dbx_to_regnum bug has been fixed, it probably doesn't
matter, but I'm still leary of using a different register map for DWARF on
PE than every other ix86 target out there.  I'd like to get this right up
front since now is the time to avoid possibly major compatibility
changes down the road.

What do you think?  Should I revert the i386_coff_init_abi patch for
Cygwin and use the above method in gcc instead?  I'm especially interested
in input from Jim Blandy, CGF, and Corinna.

Thanks.

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax:   314-551-8444


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]