* 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:
parent
84ba0adf42
commit
30244cd87c
8 changed files with 42 additions and 111 deletions
|
@ -337,15 +337,6 @@ avr_write_pc (CORE_ADDR val, ptid_t ptid)
|
|||
inferior_ptid = save_ptid;
|
||||
}
|
||||
|
||||
static CORE_ADDR
|
||||
avr_read_sp (void)
|
||||
{
|
||||
ULONGEST sp;
|
||||
|
||||
regcache_cooked_read_unsigned (current_regcache, AVR_SP_REGNUM, &sp);
|
||||
return (avr_make_saddr (sp));
|
||||
}
|
||||
|
||||
static int
|
||||
avr_scan_arg_moves (int vpc, unsigned char *prologue)
|
||||
{
|
||||
|
@ -943,6 +934,16 @@ avr_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
|
|||
return avr_make_iaddr (pc);
|
||||
}
|
||||
|
||||
static CORE_ADDR
|
||||
avr_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
|
||||
{
|
||||
ULONGEST sp;
|
||||
|
||||
frame_unwind_unsigned_register (next_frame, AVR_SP_REGNUM, &sp);
|
||||
|
||||
return avr_make_saddr (sp);
|
||||
}
|
||||
|
||||
/* Given a GDB frame, determine the address of the calling function's
|
||||
frame. This will be used to create a new GDB frame struct. */
|
||||
|
||||
|
@ -1274,7 +1275,6 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
|||
|
||||
set_gdbarch_read_pc (gdbarch, avr_read_pc);
|
||||
set_gdbarch_write_pc (gdbarch, avr_write_pc);
|
||||
set_gdbarch_read_sp (gdbarch, avr_read_sp);
|
||||
|
||||
set_gdbarch_num_regs (gdbarch, AVR_NUM_REGS);
|
||||
|
||||
|
@ -1303,6 +1303,7 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
|||
set_gdbarch_unwind_dummy_id (gdbarch, avr_unwind_dummy_id);
|
||||
|
||||
set_gdbarch_unwind_pc (gdbarch, avr_unwind_pc);
|
||||
set_gdbarch_unwind_sp (gdbarch, avr_unwind_sp);
|
||||
|
||||
return gdbarch;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue