aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2000-05-15 06:27:18 +0000
committerAndrew Cagney <cagney@redhat.com>2000-05-15 06:27:18 +0000
commitd1e3cf49987161b72dd638ff94a5fc3e1f684484 (patch)
treefb3689f10eea0c4158d27e4296c4b96792b61a8d /gdb/gdbarch.c
parentf23d52e0a54905bc88c1a5ea25168227356d6f37 (diff)
downloadgdb-d1e3cf49987161b72dd638ff94a5fc3e1f684484.zip
gdb-d1e3cf49987161b72dd638ff94a5fc3e1f684484.tar.gz
gdb-d1e3cf49987161b72dd638ff94a5fc3e1f684484.tar.bz2
Convert SAVE_DUMMY_FRAME_TOS to multi-arch.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r--gdb/gdbarch.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 557633d..bcad7b9 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -219,6 +219,7 @@ struct gdbarch
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;
};
@@ -329,6 +330,7 @@ struct gdbarch startup_gdbarch = {
0,
0,
0,
+ 0,
/* startup_gdbarch() */
};
struct gdbarch *current_gdbarch = &startup_gdbarch;
@@ -634,6 +636,7 @@ verify_gdbarch (struct gdbarch *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 */
}
@@ -1176,6 +1179,12 @@ gdbarch_dump (void)
(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",
GDB_MULTI_ARCH);
@@ -2788,6 +2797,29 @@ set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
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. */