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 | a9e5fdc21938b3d8733bdfc5931088319c921f78 (patch) | |
tree | b4bc9eaae69953942219023cc1089cbdd9f20a48 /gdb/d10v-tdep.c | |
parent | 5cf72d3591cee5531e4e07df09f0b063f80bd9fa (diff) | |
download | gdb-a9e5fdc21938b3d8733bdfc5931088319c921f78.zip gdb-a9e5fdc21938b3d8733bdfc5931088319c921f78.tar.gz gdb-a9e5fdc21938b3d8733bdfc5931088319c921f78.tar.bz2 |
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 a83d6ba..84d0a85 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); |