diff options
author | Andrew Cagney <cagney@redhat.com> | 2000-12-04 04:01:16 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2000-12-04 04:01:16 +0000 |
commit | 88c72b7d7171d9f162ed9ecca26cf1d45abc38ee (patch) | |
tree | 1c26ec8f099591f20accc499889b50d37e516629 /gdb/mips-tdep.c | |
parent | 76440e4ba0ba69ee333c0cfb8e630c68205a80c6 (diff) | |
download | gdb-88c72b7d7171d9f162ed9ecca26cf1d45abc38ee.zip gdb-88c72b7d7171d9f162ed9ecca26cf1d45abc38ee.tar.gz gdb-88c72b7d7171d9f162ed9ecca26cf1d45abc38ee.tar.bz2 |
Multiarch STAB_REG_TO_REGNUM, ECOFF_REG_TO_REGNUM,
DWARF_REG_TO_REGNUM, SDB_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r-- | gdb/mips-tdep.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 3d119c8..61c9b95 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -3801,6 +3801,29 @@ mips_saved_pc_after_call (struct frame_info *frame) } +/* Convert a dbx stab register number (from `r' declaration) to a gdb + REGNUM */ + +static int +mips_stab_reg_to_regnum (int num) +{ + if (num < 32) + return num; + else + return num + FP0_REGNUM - 38; +} + +/* Convert a ecoff register number to a gdb REGNUM */ + +static int +mips_ecoff_reg_to_regnum (int num) +{ + if (num < 32) + return num; + else + return num + FP0_REGNUM - 32; +} + static struct gdbarch * mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) @@ -4042,6 +4065,10 @@ mips_gdbarch_init (struct gdbarch_info info, set_gdbarch_read_sp (gdbarch, generic_target_read_sp); set_gdbarch_write_sp (gdbarch, generic_target_write_sp); + /* Map debug register numbers onto internal register numbers. */ + set_gdbarch_stab_reg_to_regnum (gdbarch, mips_stab_reg_to_regnum); + set_gdbarch_ecoff_reg_to_regnum (gdbarch, mips_ecoff_reg_to_regnum); + /* Initialize a frame */ set_gdbarch_init_extra_frame_info (gdbarch, mips_init_extra_frame_info); |