gdbarch_frame_num_args_ftype *frame_num_args;
gdbarch_stack_align_ftype *stack_align;
gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
+ gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos;
};
0,
0,
0,
+ 0,
/* startup_gdbarch() */
};
struct gdbarch *current_gdbarch = &startup_gdbarch;
internal_error ("gdbarch: verify_gdbarch: frame_num_args invalid");
/* Skip verify of stack_align, has predicate */
/* Skip verify of reg_struct_has_addr, has predicate */
+ /* Skip verify of save_dummy_frame_tos, has predicate */
}
"gdbarch_update: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
(long) current_gdbarch->reg_struct_has_addr
/*REG_STRUCT_HAS_ADDR ()*/);
+#endif
+#ifdef SAVE_DUMMY_FRAME_TOS
+ fprintf_unfiltered (gdb_stdlog,
+ "gdbarch_update: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
+ (long) current_gdbarch->save_dummy_frame_tos
+ /*SAVE_DUMMY_FRAME_TOS ()*/);
#endif
fprintf_unfiltered (gdb_stdlog,
"gdbarch_update: GDB_MULTI_ARCH = %d\n",
gdbarch->reg_struct_has_addr = reg_struct_has_addr;
}
+int
+gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
+{
+ return gdbarch->save_dummy_frame_tos != 0;
+}
+
+void
+gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
+{
+ if (gdbarch->save_dummy_frame_tos == 0)
+ internal_error ("gdbarch: gdbarch_save_dummy_frame_tos invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
+ gdbarch->save_dummy_frame_tos (sp);
+}
+
+void
+set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch,
+ gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos)
+{
+ gdbarch->save_dummy_frame_tos = save_dummy_frame_tos;
+}
+
/* Keep a registrary of per-architecture data-pointers required by GDB
modules. */
#endif
#endif
+#if defined (SAVE_DUMMY_FRAME_TOS)
+/* Legacy for systems yet to multi-arch SAVE_DUMMY_FRAME_TOS */
+#define SAVE_DUMMY_FRAME_TOS_P() (1)
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (GDB_MULTI_ARCH == 0) && !defined (SAVE_DUMMY_FRAME_TOS_P)
+#define SAVE_DUMMY_FRAME_TOS_P() (0)
+#endif
+
+extern int gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > 1) || !defined (SAVE_DUMMY_FRAME_TOS_P)
+#define SAVE_DUMMY_FRAME_TOS_P() (gdbarch_save_dummy_frame_tos_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (GDB_MULTI_ARCH == 0) && !defined (SAVE_DUMMY_FRAME_TOS)
+#define SAVE_DUMMY_FRAME_TOS(sp) (internal_error ("SAVE_DUMMY_FRAME_TOS"), 0)
+#endif
+
+typedef void (gdbarch_save_dummy_frame_tos_ftype) (CORE_ADDR sp);
+extern void gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp);
+extern void set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos);
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > 1) || !defined (SAVE_DUMMY_FRAME_TOS)
+#define SAVE_DUMMY_FRAME_TOS(sp) (gdbarch_save_dummy_frame_tos (current_gdbarch, sp))
+#endif
+#endif
+
extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);