aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-01-29 18:07:07 +0000
committerAndrew Cagney <cagney@redhat.com>2003-01-29 18:07:07 +0000
commitd62d1979c455befe90f07993d51a279cc0043f5b (patch)
tree14aea024165995c8108171095ebcd5cbab780901 /gdb/gdbarch.h
parent617073a91ffd58111d51e65983f5d442cf933e51 (diff)
downloadgdb-d62d1979c455befe90f07993d51a279cc0043f5b.zip
gdb-d62d1979c455befe90f07993d51a279cc0043f5b.tar.gz
gdb-d62d1979c455befe90f07993d51a279cc0043f5b.tar.bz2
2003-01-29 Andrew Cagney <ac131313@redhat.com>
* frame.c (frame_saved_regs_id_unwind): Assert FRAME_CHAIN_P. (legacy_get_prev_frame): Assert FRAME_CHAIN_P. (get_prev_frame): When FRAME_CHAIN_P, call legacy_get_prev_frame. (frame_saved_regs_pc_unwind): Assert FRAME_SAVED_PC_P. * gdbarch.sh (FRAME_CHAIN): Change to a function with predicate. (FRAME_SAVED_PC): Change to a function with predicate. * gdbarch.h, gdbarch.c: Re-generate.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r--gdb/gdbarch.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 303477c..929b027 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -2026,6 +2026,31 @@ extern void set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
#endif
#endif
+#if defined (FRAME_CHAIN)
+/* Legacy for systems yet to multi-arch FRAME_CHAIN */
+#if !defined (FRAME_CHAIN_P)
+#define FRAME_CHAIN_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (FRAME_CHAIN_P)
+#define FRAME_CHAIN_P() (0)
+#endif
+
+extern int gdbarch_frame_chain_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_CHAIN_P)
+#error "Non multi-arch definition of FRAME_CHAIN"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_CHAIN_P)
+#define FRAME_CHAIN_P() (gdbarch_frame_chain_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (FRAME_CHAIN)
+#define FRAME_CHAIN(frame) (internal_error (__FILE__, __LINE__, "FRAME_CHAIN"), 0)
+#endif
+
typedef CORE_ADDR (gdbarch_frame_chain_ftype) (struct frame_info *frame);
extern CORE_ADDR gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame);
extern void set_gdbarch_frame_chain (struct gdbarch *gdbarch, gdbarch_frame_chain_ftype *frame_chain);
@@ -2075,6 +2100,31 @@ extern void set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch, gdbarch_fram
#endif
#endif
+#if defined (FRAME_SAVED_PC)
+/* Legacy for systems yet to multi-arch FRAME_SAVED_PC */
+#if !defined (FRAME_SAVED_PC_P)
+#define FRAME_SAVED_PC_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (FRAME_SAVED_PC_P)
+#define FRAME_SAVED_PC_P() (0)
+#endif
+
+extern int gdbarch_frame_saved_pc_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_SAVED_PC_P)
+#error "Non multi-arch definition of FRAME_SAVED_PC"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_SAVED_PC_P)
+#define FRAME_SAVED_PC_P() (gdbarch_frame_saved_pc_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (FRAME_SAVED_PC)
+#define FRAME_SAVED_PC(fi) (internal_error (__FILE__, __LINE__, "FRAME_SAVED_PC"), 0)
+#endif
+
typedef CORE_ADDR (gdbarch_frame_saved_pc_ftype) (struct frame_info *fi);
extern CORE_ADDR gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi);
extern void set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch, gdbarch_frame_saved_pc_ftype *frame_saved_pc);