diff options
author | Mark Kettenis <kettenis@gnu.org> | 2001-07-28 17:03:38 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2001-07-28 17:03:38 +0000 |
commit | 85540d8c4ad4df82637ddc835173c80d4dcdac08 (patch) | |
tree | f037cae0508e39ab7c00b043968e51194907795a /gdb/config/i386 | |
parent | 3d2615808faf9c93f0fe8a20133fa80e12163a82 (diff) | |
download | gdb-85540d8c4ad4df82637ddc835173c80d4dcdac08.zip gdb-85540d8c4ad4df82637ddc835173c80d4dcdac08.tar.gz gdb-85540d8c4ad4df82637ddc835173c80d4dcdac08.tar.bz2 |
* config/i386/tm-i386.h (STAB_REG_TO_REGNUM, SDB_REG_TO_REGNUM,
DWARF_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM): New defines.
(i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum): New
prototypes.
* config/i386/tm-fbsd.h, config/i386/tm-i386gnu.h,
config/i386/tm-linux.h (STAB_REG_TO_REGNUM): Redefine to call
i386_dwarf_reg_to_regnum.
* i386-tdep.c (i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum):
New functions.
Diffstat (limited to 'gdb/config/i386')
-rw-r--r-- | gdb/config/i386/tm-fbsd.h | 8 | ||||
-rw-r--r-- | gdb/config/i386/tm-i386gnu.h | 5 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gdb/config/i386/tm-fbsd.h b/gdb/config/i386/tm-fbsd.h index f8f4889..61f5de5 100644 --- a/gdb/config/i386/tm-fbsd.h +++ b/gdb/config/i386/tm-fbsd.h @@ -24,6 +24,14 @@ #define HAVE_I387_REGS #include "i386/tm-i386.h" +/* FreeBSD/ELF uses stabs-in-ELF with the DWARF register numbering + scheme by default, so we must redefine STAB_REG_TO_REGNUM. This + messes up the floating-point registers for a.out, but there is not + much we can do about that. */ + +#undef STAB_REG_TO_REGNUM +#define STAB_REG_TO_REGNUM(reg) i386_dwarf_reg_to_regnum ((reg)) + /* FreeBSD uses the old gcc convention for struct returns. */ #define USE_STRUCT_CONVENTION(gcc_p, type) \ diff --git a/gdb/config/i386/tm-i386gnu.h b/gdb/config/i386/tm-i386gnu.h index 6f6d245..00cb5a9 100644 --- a/gdb/config/i386/tm-i386gnu.h +++ b/gdb/config/i386/tm-i386gnu.h @@ -42,6 +42,11 @@ #define HAVE_I387_REGS #include "i386/tm-i386.h" +/* We use stabs-in-ELF with the DWARF register numbering scheme. */ + +#undef STAB_REG_TO_REGNUM +#define STAB_REG_TO_REGNUM(reg) i386_dwarf_reg_to_regnum ((reg)) + /* Offset to saved PC in sigcontext. */ #define SIGCONTEXT_PC_OFFSET 68 |