diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-06-09 01:02:07 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-06-09 01:02:07 +0000 |
commit | 047068dce6a84edf9e756af0e8fa68770894646e (patch) | |
tree | bbb46cc220876aaa89cb9cfbb84856d860d16124 /gdb/d10v-tdep.c | |
parent | 66f6e5b862e1486eadeaf12f2890b4913ccb63ad (diff) | |
download | gdb-047068dce6a84edf9e756af0e8fa68770894646e.tar.gz |
2003-06-08 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (UNWIND_SP): Add.
* gdbarch.h, gdbarch.c: Re-generate.
* frame.c (frame_sp_unwind): New function.
(get_frame_sp): New function.
* frame.h (get_frame_sp, frame_sp_unwind): Declare.
* regcache.c (read_sp): Rewrite, try each of TARGET_READ_SP,
gdbarch_unwind_sp and SP_REGNUM when looking for the SP register
value.
* d10v-tdep.c (d10v_unwind_sp): Replace d10v_read_sp.
(d10v_gdbarch_init): Set unwind_sp instead of read_sp.
2003-06-08 Andrew Cagney <cagney@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Document
"unwind_sp". Cross reference "unwind_sp" and TARGET_READ_SP.
Diffstat (limited to 'gdb/d10v-tdep.c')
-rw-r--r-- | gdb/d10v-tdep.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c index a83d6bae20f..84d0a85244d 100644 --- a/gdb/d10v-tdep.c +++ b/gdb/d10v-tdep.c @@ -102,8 +102,6 @@ a0_regnum (struct gdbarch *gdbarch) extern void _initialize_d10v_tdep (void); -static CORE_ADDR d10v_read_sp (void); - static void d10v_eva_prepare_to_trace (void); static void d10v_eva_get_trace_data (void); @@ -902,9 +900,11 @@ d10v_write_pc (CORE_ADDR val, ptid_t ptid) } static CORE_ADDR -d10v_read_sp (void) +d10v_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) { - return (d10v_make_daddr (read_register (D10V_SP_REGNUM))); + ULONGEST sp; + frame_unwind_unsigned_register (next_frame, D10V_SP_REGNUM, &sp); + return d10v_make_daddr (sp); } /* When arguments must be pushed onto the stack, they go on in reverse @@ -1528,7 +1528,7 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_read_pc (gdbarch, d10v_read_pc); set_gdbarch_write_pc (gdbarch, d10v_write_pc); - set_gdbarch_read_sp (gdbarch, d10v_read_sp); + set_gdbarch_unwind_sp (gdbarch, d10v_unwind_sp); set_gdbarch_num_regs (gdbarch, d10v_num_regs); set_gdbarch_sp_regnum (gdbarch, D10V_SP_REGNUM); |