* 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.
This commit is contained in:
Ulrich Weigand
2007-05-14 15:17:00 +00:00
parent 84ba0adf42
commit 30244cd87c
8 changed files with 42 additions and 111 deletions

View File

@ -190,26 +190,18 @@ 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)
{
return score_read_unsigned_register (SCORE_SP_REGNUM);
}
static CORE_ADDR
score_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
return frame_unwind_register_unsigned (next_frame, SCORE_PC_REGNUM);
}
static CORE_ADDR
score_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
return frame_unwind_register_unsigned (next_frame, SCORE_SP_REGNUM);
}
static const char *
score_register_name (int regnum)
{
@ -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);