summaryrefslogtreecommitdiff
path: root/gdb/score-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/score-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/score-tdep.c')
-rw-r--r--gdb/score-tdep.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/gdb/score-tdep.c b/gdb/score-tdep.c
index d739333a70e..aeb8fdcc7ec 100644
--- a/gdb/score-tdep.c
+++ b/gdb/score-tdep.c
@@ -190,24 +190,16 @@ score_register_type (struct gdbarch *gdbarch, int regnum)
return builtin_type_uint32;
}
-static LONGEST
-score_read_unsigned_register (int regnum)
-{
- LONGEST val;
- regcache_cooked_read_unsigned (current_regcache, regnum, &val);
- return val;
-}
-
static CORE_ADDR
-score_read_sp (void)
+score_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- return score_read_unsigned_register (SCORE_SP_REGNUM);
+ return frame_unwind_register_unsigned (next_frame, SCORE_PC_REGNUM);
}
static CORE_ADDR
-score_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
+score_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- return frame_unwind_register_unsigned (next_frame, SCORE_PC_REGNUM);
+ return frame_unwind_register_unsigned (next_frame, SCORE_SP_REGNUM);
}
static const char *
@@ -880,8 +872,8 @@ score_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_type (gdbarch, score_register_type);
set_gdbarch_frame_align (gdbarch, score_frame_align);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- set_gdbarch_read_sp (gdbarch, score_read_sp);
set_gdbarch_unwind_pc (gdbarch, score_unwind_pc);
+ set_gdbarch_unwind_sp (gdbarch, score_unwind_sp);
set_gdbarch_print_insn (gdbarch, score_print_insn);
set_gdbarch_skip_prologue (gdbarch, score_skip_prologue);
set_gdbarch_in_function_epilogue_p (gdbarch, score_in_function_epilogue_p);