diff options
author | Mark Kettenis <kettenis@gnu.org> | 2003-10-11 12:52:30 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2003-10-11 12:52:30 +0000 |
commit | 6ce6d90f6aef5f229c0356d49271bf56283a50f5 (patch) | |
tree | deed74af1c1666f7bae0cf1ce2d8c60009624bf8 /gdb/gdbarch.c | |
parent | 9e126dc09489530f0300ed7c6b417ce1e27d312f (diff) | |
download | gdb-6ce6d90f6aef5f229c0356d49271bf56283a50f5.zip gdb-6ce6d90f6aef5f229c0356d49271bf56283a50f5.tar.gz gdb-6ce6d90f6aef5f229c0356d49271bf56283a50f5.tar.bz2 |
* gdbarch.sh (regset_from_core_section): New method.
(struct regset): Declare opaque.
* gdbarch.c, gdbarch.h: Regenerated.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r-- | gdb/gdbarch.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 2844918..d5aa595 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -267,6 +267,7 @@ struct gdbarch 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; }; @@ -436,6 +437,7 @@ struct gdbarch startup_gdbarch = 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() */ }; @@ -765,6 +767,7 @@ verify_gdbarch (struct gdbarch *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) @@ -796,6 +799,12 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *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); fprintf_unfiltered (file, @@ -5474,6 +5483,30 @@ set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, 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. */ |