diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-05-14 15:17:00 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-05-14 15:17:00 +0000 |
commit | 30244cd87c0b05f16c0919b0a5ab12c821f49bed (patch) | |
tree | 923ec999746aa830af9dac167afe46d7575743fe /gdb/avr-tdep.c | |
parent | 84ba0adf42e55d24e3656fc0b0dbcff5eb1e0bbc (diff) | |
download | gdb-30244cd87c0b05f16c0919b0a5ab12c821f49bed.zip gdb-30244cd87c0b05f16c0919b0a5ab12c821f49bed.tar.gz gdb-30244cd87c0b05f16c0919b0a5ab12c821f49bed.tar.bz2 |
* 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/avr-tdep.c')
-rw-r--r-- | gdb/avr-tdep.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index 9f0793e..d072459 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c @@ -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; } |