aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-06-09 01:02:07 +0000
committerAndrew Cagney <cagney@redhat.com>2003-06-09 01:02:07 +0000
commita9e5fdc21938b3d8733bdfc5931088319c921f78 (patch)
treeb4bc9eaae69953942219023cc1089cbdd9f20a48 /gdb/gdbarch.h
parent5cf72d3591cee5531e4e07df09f0b063f80bd9fa (diff)
downloadgdb-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/gdbarch.h')
-rw-r--r--gdb/gdbarch.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 092f487..e9895cf 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -371,6 +371,8 @@ extern void set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch, gdba
#define DEPRECATED_TARGET_READ_FP() (gdbarch_deprecated_target_read_fp (current_gdbarch))
#endif
+/* UNWIND_SP is a direct replacement for TARGET_READ_SP. */
+
#if defined (TARGET_READ_SP)
/* Legacy for systems yet to multi-arch TARGET_READ_SP */
#if !defined (TARGET_READ_SP_P)
@@ -504,7 +506,8 @@ extern void set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, int num_pseudo
/* GDB's standard (or well known) register numbers. These can map onto
a real register or a pseudo (computed) register or not be defined at
- all (-1). */
+ all (-1).
+ SP_REGNUM will hopefully be replaced by UNWIND_SP. */
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (SP_REGNUM)
@@ -2257,6 +2260,12 @@ typedef CORE_ADDR (gdbarch_unwind_pc_ftype) (struct gdbarch *gdbarch, struct fra
extern CORE_ADDR gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame);
extern void set_gdbarch_unwind_pc (struct gdbarch *gdbarch, gdbarch_unwind_pc_ftype *unwind_pc);
+extern int gdbarch_unwind_sp_p (struct gdbarch *gdbarch);
+
+typedef CORE_ADDR (gdbarch_unwind_sp_ftype) (struct gdbarch *gdbarch, struct frame_info *next_frame);
+extern CORE_ADDR gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame);
+extern void set_gdbarch_unwind_sp (struct gdbarch *gdbarch, gdbarch_unwind_sp_ftype *unwind_sp);
+
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (FRAME_ARGS_ADDRESS)
#define FRAME_ARGS_ADDRESS(fi) (get_frame_base (fi))