aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-04-08 21:56:10 +0000
committerAndrew Cagney <cagney@redhat.com>2003-04-08 21:56:10 +0000
commit4443bd8373866e76ec700a8bb3f5df8a50ba3714 (patch)
tree9b8a010feedc37eff9c2dcde41f59f484c9f0418 /gdb/gdbarch.h
parenta66624bc3e854775dc9857ce23ead38b741f9dbe (diff)
downloadgdb-4443bd8373866e76ec700a8bb3f5df8a50ba3714.zip
gdb-4443bd8373866e76ec700a8bb3f5df8a50ba3714.tar.gz
gdb-4443bd8373866e76ec700a8bb3f5df8a50ba3714.tar.bz2
2003-04-08 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (SAVED_PC_AFTER_CALL): Add a predicate. * gdbarch.h, gdbarch.c: Re-generate. * d10v-tdep.c (d10v_saved_pc_after_call): Delete function. (d10v_gdbarch_init): Do not set saved_pc_after_call. * infrun.c (step_over_function): Call SAVED_PC_AFTER_CALL_P conditionally, use frame_pc_unwind as an alternative. Add comments. * arch-utils.c (init_frame_pc_default): Only call SAVED_PC_AFTER_CALL when available.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r--gdb/gdbarch.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index b2644f7..c1f02c8 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -2385,6 +2385,31 @@ extern void set_gdbarch_frame_locals_address (struct gdbarch *gdbarch, gdbarch_f
#endif
#endif
+#if defined (SAVED_PC_AFTER_CALL)
+/* Legacy for systems yet to multi-arch SAVED_PC_AFTER_CALL */
+#if !defined (SAVED_PC_AFTER_CALL_P)
+#define SAVED_PC_AFTER_CALL_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (SAVED_PC_AFTER_CALL_P)
+#define SAVED_PC_AFTER_CALL_P() (0)
+#endif
+
+extern int gdbarch_saved_pc_after_call_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVED_PC_AFTER_CALL_P)
+#error "Non multi-arch definition of SAVED_PC_AFTER_CALL"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVED_PC_AFTER_CALL_P)
+#define SAVED_PC_AFTER_CALL_P() (gdbarch_saved_pc_after_call_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (SAVED_PC_AFTER_CALL)
+#define SAVED_PC_AFTER_CALL(frame) (internal_error (__FILE__, __LINE__, "SAVED_PC_AFTER_CALL"), 0)
+#endif
+
typedef CORE_ADDR (gdbarch_saved_pc_after_call_ftype) (struct frame_info *frame);
extern CORE_ADDR gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame);
extern void set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, gdbarch_saved_pc_after_call_ftype *saved_pc_after_call);