aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2000-04-22 06:44:39 +0000
committerAndrew Cagney <cagney@redhat.com>2000-04-22 06:44:39 +0000
commitd03e67c95f6ddaaf4d8ad1a17752099403b83bda (patch)
tree63b8e978c16bb3925fc80a7ebf07a88c76406eaa /gdb/gdbarch.c
parent19be430370b901be8149b925820d300a2663ef43 (diff)
downloadgdb-d03e67c95f6ddaaf4d8ad1a17752099403b83bda.zip
gdb-d03e67c95f6ddaaf4d8ad1a17752099403b83bda.tar.gz
gdb-d03e67c95f6ddaaf4d8ad1a17752099403b83bda.tar.bz2
Convert REG_STRUCT_HAS_ADDR to multi-arch. Use REG_STRUCT_HAS_ADDR_P
in conversion.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r--gdb/gdbarch.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 06eccad..b14cee8 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -214,6 +214,7 @@ struct gdbarch
gdbarch_saved_pc_after_call_ftype *saved_pc_after_call;
gdbarch_frame_num_args_ftype *frame_num_args;
gdbarch_stack_align_ftype *stack_align;
+ gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
};
@@ -319,6 +320,7 @@ struct gdbarch startup_gdbarch = {
0,
0,
0,
+ 0,
/* startup_gdbarch() */
};
struct gdbarch *current_gdbarch = &startup_gdbarch;
@@ -623,6 +625,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
&& (gdbarch->frame_num_args == 0))
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 */
}
@@ -962,6 +965,10 @@ gdbarch_dump (void)
"gdbarch_update: STACK_ALIGN = 0x%08lx\n",
(long) current_gdbarch->stack_align
/*STACK_ALIGN ()*/);
+ fprintf_unfiltered (gdb_stdlog,
+ "gdbarch_update: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
+ (long) current_gdbarch->reg_struct_has_addr
+ /*REG_STRUCT_HAS_ADDR ()*/);
}
struct gdbarch_tdep *
@@ -2517,6 +2524,29 @@ set_gdbarch_stack_align (struct gdbarch *gdbarch,
gdbarch->stack_align = stack_align;
}
+int
+gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
+{
+ return gdbarch->reg_struct_has_addr != 0;
+}
+
+int
+gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
+{
+ if (gdbarch->reg_struct_has_addr == 0)
+ internal_error ("gdbarch: gdbarch_reg_struct_has_addr invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
+ return gdbarch->reg_struct_has_addr (gcc_p, type);
+}
+
+void
+set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
+ gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr)
+{
+ gdbarch->reg_struct_has_addr = reg_struct_has_addr;
+}
+
/* Keep a registrary of per-architecture data-pointers required by GDB
modules. */