Re: [PATCH] i386_stab_reg_to_regnum (4 <-> 5, ebp <-> esp)

Mark Kettenis
2004-04-06T23:24:58Z

Date: Mon, 5 Apr 2004 18:19:09 -0500 (CDT)
From: Brian Ford <ford@vss.fsi.com>

> The big question is, "Why wasn't it noticed before?" but there's an
> answer to that which seems pretty solid to me:
>
> - GCC's dbx_register_map and GDB's i386_stab_reg_to_regnum simply
> aren't used on many modern systems. Every ELF target that I see in
> GCC (except for i[34567]86-*-nto-qnx*) uses gcc/config/i386/i386.c's
> svr4_dbx_register_map. That agrees with i386-tdep.c's
> i386_dwarf_reg_to_regnum.
[snip]
> So just about every ELF target uses gdb/i386.c's
> i386_dwarf_reg_to_regnum for both STABS and Dwarf 2. So they never
> see the broken numbering.

Agreed. I still propose we rename the _to_regnum functions, replacing
stabs and dwarf with dbx and svr4 to reduce confusion. I'll be happy to
make a patch :-).

Please do so.

Mark