This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] Proper _to_regnum for DWARF on Cygwin
Date: 19 Apr 2004 08:50:59 +0200
From: Eli Zaretskii <eliz@elta.co.il>
> Date: Sun, 18 Apr 2004 20:38:38 +0200 (CEST)
> From: Mark Kettenis <kettenis@chello.nl>
>
> + /* We typically use DWARF-in-COFF with the dbx register numbering. */
> + set_gdbarch_dwarf_reg_to_regnum (gdbarch, i386_dbx_reg_to_regnum);
> + set_gdbarch_dwarf2_reg_to_regnum (gdbarch, i386_dbx_reg_to_regnum);
> }
Mark, doesn't this code above from i386_coff_init_abi contradict the
code further down (and the register mapping used by GCC), viz:
> + /* Use the SVR4 register numbering scheme for DWARF and DWARF 2. */
> + set_gdbarch_dwarf_reg_to_regnum (gdbarch, i386_svr4_reg_to_regnum);
> + set_gdbarch_dwarf2_reg_to_regnum (gdbarch, i386_svr4_reg_to_regnum);
? For DJGPP, at least, DWARF2-in-COFF uses i386_svr4_reg_to_regnum
register mapping, not i386_dbx_reg_to_regnum. Am I missing something
here?
Hmm. I very much agree with what Brian wrote in his follow-up
messages. I think DJGPP is doing the right thing using the SVR4
scheme for DWARF2 while staying backwards compatible for stabs. I'd
advise him to do the same for cygwin. If i386_coff_init_abi will be
gone, the comments aren't contradictiory anymore.
> + /* NOTE: kettenis/20040418: GCC does have two possible register
> + numbering schemes on the i386: dbx and SVR4. These schemes
> + differ in how they number %ebp, %esp, %eflags, and the
> + floating-point registers, and are implemented by the attays
^^^^^^
A typo.
I though I'd fixed that one :-(.