gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
gdbarch_register_reggroup_p_ftype *register_reggroup_p;
gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
+ gdbarch_regset_from_core_section_ftype *regset_from_core_section;
};
0, /* address_class_name_to_type_flags */
default_register_reggroup_p, /* register_reggroup_p */
0, /* fetch_pointer_argument */
+ 0, /* regset_from_core_section */
/* startup_gdbarch() */
};
/* Skip verify of address_class_name_to_type_flags, has predicate */
/* Skip verify of register_reggroup_p, invalid_p == 0 */
/* Skip verify of fetch_pointer_argument, has predicate */
+ /* Skip verify of regset_from_core_section, has predicate */
buf = ui_file_xstrdup (log, &dummy);
make_cleanup (xfree, buf);
if (strlen (buf) > 0)
fprintf_unfiltered (file,
"gdbarch_dump: frame_align = 0x%08lx\n",
(long) current_gdbarch->frame_align);
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n",
+ gdbarch_regset_from_core_section_p (current_gdbarch));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: regset_from_core_section = 0x%08lx\n",
+ (long) current_gdbarch->regset_from_core_section);
fprintf_unfiltered (file,
"gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
(long) current_gdbarch->in_function_epilogue_p);
gdbarch->fetch_pointer_argument = fetch_pointer_argument;
}
+int
+gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->regset_from_core_section != NULL;
+}
+
+const struct regset *
+gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->regset_from_core_section != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
+ return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
+}
+
+void
+set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
+ gdbarch_regset_from_core_section_ftype regset_from_core_section)
+{
+ gdbarch->regset_from_core_section = regset_from_core_section;
+}
+
/* Keep a registry of per-architecture data-pointers required by GDB
modules. */
struct minimal_symbol;
struct regcache;
struct reggroup;
+struct regset;
struct disassemble_info;
extern struct gdbarch *current_gdbarch;
#define FETCH_POINTER_ARGUMENT(frame, argi, type) (gdbarch_fetch_pointer_argument (current_gdbarch, frame, argi, type))
#endif
+/* Return the appropriate register set for a core file section with
+ name SECT_NAME and size SECT_SIZE. */
+
+extern int gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch);
+
+typedef const struct regset * (gdbarch_regset_from_core_section_ftype) (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size);
+extern const struct regset * gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size);
+extern void set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch, gdbarch_regset_from_core_section_ftype *regset_from_core_section);
+
extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);
m:::int:register_reggroup_p:int regnum, struct reggroup *reggroup:regnum, reggroup:::default_register_reggroup_p::0
# Fetch the pointer to the ith function argument.
F::FETCH_POINTER_ARGUMENT:CORE_ADDR:fetch_pointer_argument:struct frame_info *frame, int argi, struct type *type:frame, argi, type
+
+# Return the appropriate register set for a core file section with
+# name SECT_NAME and size SECT_SIZE.
+M:::const struct regset *:regset_from_core_section:const char *sect_name, size_t sect_size:sect_name, sect_size
EOF
}
struct minimal_symbol;
struct regcache;
struct reggroup;
+struct regset;
struct disassemble_info;
extern struct gdbarch *current_gdbarch;