aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-03-31 23:52:38 +0000
committerAndrew Cagney <cagney@redhat.com>2003-03-31 23:52:38 +0000
commite8ab51f713c1b8989e1601073e0265ed250b03e8 (patch)
tree9c42d648a95b4ca7a27c9a90a9b5c317fad92855 /gdb/gdbarch.h
parent018d1b488ce26f1c957db653de4e8a6a58f057c0 (diff)
downloadgdb-e8ab51f713c1b8989e1601073e0265ed250b03e8.zip
gdb-e8ab51f713c1b8989e1601073e0265ed250b03e8.tar.gz
gdb-e8ab51f713c1b8989e1601073e0265ed250b03e8.tar.bz2
2003-03-31 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (FIX_CALL_DUMMY): Change to function with predicate. * gdbarch.h, gdbarch.c: Regenerate. * inferior.h (FIX_CALL_DUMMY): Delete macro. * valops.c (hand_function_call): Only call FIX_CALL_DUMMY when available. * frame.h (generic_fix_call_dummy): Delete declaration. * dummy-frame.h: Update comment. * dummy-frame.c (generic_fix_call_dummy): Delete function. * xstormy16-tdep.c (xstormy16_gdbarch_init): Do not set fix_call_dummy. * sh-tdep.c (sh_gdbarch_init): Ditto. * s390-tdep.c (s390_gdbarch_init): Ditto. * mn10300-tdep.c (mn10300_gdbarch_init): Ditto. * mcore-tdep.c (mcore_gdbarch_init): Ditto. * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto. * ia64-tdep.c (ia64_gdbarch_init): Ditto. * i386-tdep.c (i386_gdbarch_init): Ditto. * h8300-tdep.c (h8300_gdbarch_init): Ditto. * frv-tdep.c (frv_gdbarch_init): Ditto. * d10v-tdep.c (d10v_gdbarch_init): Ditto. * cris-tdep.c (cris_gdbarch_init): Ditto. * avr-tdep.c (avr_gdbarch_init): Ditto. * arm-tdep.c (arm_gdbarch_init): Ditto.
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 261a849..fabe6be 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -1309,6 +1309,31 @@ extern void set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdba
#endif
#endif
+#if defined (FIX_CALL_DUMMY)
+/* Legacy for systems yet to multi-arch FIX_CALL_DUMMY */
+#if !defined (FIX_CALL_DUMMY_P)
+#define FIX_CALL_DUMMY_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (FIX_CALL_DUMMY_P)
+#define FIX_CALL_DUMMY_P() (0)
+#endif
+
+extern int gdbarch_fix_call_dummy_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FIX_CALL_DUMMY_P)
+#error "Non multi-arch definition of FIX_CALL_DUMMY"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FIX_CALL_DUMMY_P)
+#define FIX_CALL_DUMMY_P() (gdbarch_fix_call_dummy_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (FIX_CALL_DUMMY)
+#define FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p) (internal_error (__FILE__, __LINE__, "FIX_CALL_DUMMY"), 0)
+#endif
+
typedef void (gdbarch_fix_call_dummy_ftype) (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p);
extern void gdbarch_fix_call_dummy (struct gdbarch *gdbarch, char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p);
extern void set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch, gdbarch_fix_call_dummy_ftype *fix_call_dummy);