aboutsummaryrefslogtreecommitdiff
path: root/gdb/mips-tdep.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-06-15 22:10:21 +0000
committerAndrew Cagney <cagney@redhat.com>2001-06-15 22:10:21 +0000
commit875e1767977dcd0cb4d169a80e42533838f96dd3 (patch)
treea53561050fd079d71d79e1109cbabeeef6b79fe0 /gdb/mips-tdep.c
parent97804409cc482c73570b64a42a0efe3590f5c6bc (diff)
downloadgdb-875e1767977dcd0cb4d169a80e42533838f96dd3.zip
gdb-875e1767977dcd0cb4d169a80e42533838f96dd3.tar.gz
gdb-875e1767977dcd0cb4d169a80e42533838f96dd3.tar.bz2
multi-arch ADDR_BITS_REMOVE.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r--gdb/mips-tdep.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 4ecc925..2d86b5e 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -1340,7 +1340,7 @@ read_next_frame_reg (struct frame_info *fi, int regno)
/* mips_addr_bits_remove - remove useless address bits */
-CORE_ADDR
+static CORE_ADDR
mips_addr_bits_remove (CORE_ADDR addr)
{
if (GDB_TARGET_IS_MIPS64)
@@ -4123,6 +4123,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);
+ /* Add/remove bits from an address. The MIPS needs be careful to
+ ensure that all 32 bit addresses are sign extended to 64 bits. */
+ set_gdbarch_addr_bits_remove (gdbarch, mips_addr_bits_remove);
+
/* 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);