summaryrefslogtreecommitdiff
path: root/gdb/mips-tdep.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-05-14 15:17:00 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-05-14 15:17:00 +0000
commit4bc36e1dd42c0dfd500b85c81afd28de08c72409 (patch)
tree5edddbb3da2f18c41737256f790c3eb7ef3ec679 /gdb/mips-tdep.c
parent60787702b6ed7e5290e316688e4798355603b9c0 (diff)
downloadgdb-4bc36e1dd42c0dfd500b85c81afd28de08c72409.tar.gz
* gdbarch.sh (read_sp): Remove.
* gdbarch.c, gdbarch.h: Regenerate. * frame.c (frame_sp_unwind): Do not call TARGET_READ_SP. * avr-tdep.c (avr_read_sp): Remove. (avr_unwind_sp): New function. (avr_gdbarch_init): Install unwind_sp instead of read_sp callback. * mips-tdep.c (mips_read_sp): Remove. (mips_unwind_sp): New function. (mips_gdbarch_init): Install unwind_sp instead of read_sp callback. * score-tdep.c (score_read_unsigned_register): Remove. (score_read_sp): Remove. (score_unwind_sp): New function. (score_gdbarch_init): Install unwind_sp instead of read_sp callback.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r--gdb/mips-tdep.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index a291aa523a0..759c21f8e16 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -746,13 +746,6 @@ mips_register_type (struct gdbarch *gdbarch, int regnum)
}
}
-/* TARGET_READ_SP -- Remove useless bits from the stack pointer. */
-
-static CORE_ADDR
-mips_read_sp (void)
-{
- return read_signed_register (MIPS_SP_REGNUM);
-}
/* Should the upper word of 64-bit addresses be zeroed? */
enum auto_boolean mask_address_var = AUTO_BOOLEAN_AUTO;
@@ -838,6 +831,12 @@ mips_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
NUM_REGS + mips_regnum (gdbarch)->pc);
}
+static CORE_ADDR
+mips_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
+{
+ return frame_unwind_register_signed (next_frame, NUM_REGS + MIPS_SP_REGNUM);
+}
+
/* Assuming NEXT_FRAME->prev is a dummy, return the frame ID of that
dummy frame. The frame ID's base needs to match the TOS value
saved by save_dummy_frame_tos(), and the PC match the dummy frame's
@@ -5104,7 +5103,6 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_read_pc (gdbarch, mips_read_pc);
set_gdbarch_write_pc (gdbarch, mips_write_pc);
- set_gdbarch_read_sp (gdbarch, mips_read_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. */
@@ -5112,6 +5110,7 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Unwind the frame. */
set_gdbarch_unwind_pc (gdbarch, mips_unwind_pc);
+ set_gdbarch_unwind_sp (gdbarch, mips_unwind_sp);
set_gdbarch_unwind_dummy_id (gdbarch, mips_unwind_dummy_id);
/* Map debug register numbers onto internal register numbers. */