diff options
author | Daniel Jacobowitz <drow@false.org> | 2007-09-10 21:14:11 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2007-09-10 21:14:11 +0000 |
commit | 4eb0ad19f379a411b76d7adf2664c46f79402878 (patch) | |
tree | 10d6012bd8cc9d1f46589acbdccdd215cd792bcb /gdb/gdbarch.c | |
parent | 6a6b96b9c2552b97902d8ef1fbbce207328eef16 (diff) | |
download | gdb-4eb0ad19f379a411b76d7adf2664c46f79402878.zip gdb-4eb0ad19f379a411b76d7adf2664c46f79402878.tar.gz gdb-4eb0ad19f379a411b76d7adf2664c46f79402878.tar.bz2 |
* arch-utils.c (gdbarch_info_fill): Also try core_bfd.
* corelow.c (core_read_description): New.
(init_core_ops): Set to_read_description.
* gdbarch.sh: Add gdbarch_core_read_description.
* mips-linux-tdep.c (mips_linux_core_read_description): New.
(mips_linux_init_abi): Call set_gdbarch_core_read_description.
* mips-tdep.c (mips_tdesc_gp32, mips_tdesc_gp64): New.
(mips_register_g_packet_guesses): Use them.
(_initialize_mips_tdep): Initialize them.
* mips-tdep.h (mips_tdesc_gp32, mips_tdesc_gp64): Declare.
* gdbarch.h, gdbarch.c: 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 e4bcaca..685a87e 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -230,6 +230,7 @@ struct gdbarch int vbit_in_delta; gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint; gdbarch_overlay_update_ftype *overlay_update; + gdbarch_core_read_description_ftype *core_read_description; }; @@ -352,6 +353,7 @@ struct gdbarch startup_gdbarch = 0, /* vbit_in_delta */ 0, /* skip_permanent_breakpoint */ 0, /* overlay_update */ + 0, /* core_read_description */ /* startup_gdbarch() */ }; @@ -599,6 +601,7 @@ verify_gdbarch (struct gdbarch *current_gdbarch) /* Skip verify of vbit_in_delta, invalid_p == 0 */ /* Skip verify of skip_permanent_breakpoint, has predicate */ /* Skip verify of overlay_update, has predicate */ + /* Skip verify of core_read_description, has predicate */ buf = ui_file_xstrdup (log, &dummy); make_cleanup (xfree, buf); if (strlen (buf) > 0) @@ -714,6 +717,12 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file) "gdbarch_dump: convert_register_p = <0x%lx>\n", (long) current_gdbarch->convert_register_p); fprintf_unfiltered (file, + "gdbarch_dump: gdbarch_core_read_description_p() = %d\n", + gdbarch_core_read_description_p (current_gdbarch)); + fprintf_unfiltered (file, + "gdbarch_dump: core_read_description = <0x%lx>\n", + (long) current_gdbarch->core_read_description); + fprintf_unfiltered (file, "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n", gdbarch_core_xfer_shared_libraries_p (current_gdbarch)); fprintf_unfiltered (file, @@ -3001,6 +3010,30 @@ set_gdbarch_overlay_update (struct gdbarch *gdbarch, gdbarch->overlay_update = overlay_update; } +int +gdbarch_core_read_description_p (struct gdbarch *gdbarch) +{ + gdb_assert (gdbarch != NULL); + return gdbarch->core_read_description != NULL; +} + +const struct target_desc * +gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd) +{ + gdb_assert (gdbarch != NULL); + gdb_assert (gdbarch->core_read_description != NULL); + if (gdbarch_debug >= 2) + fprintf_unfiltered (gdb_stdlog, "gdbarch_core_read_description called\n"); + return gdbarch->core_read_description (gdbarch, target, abfd); +} + +void +set_gdbarch_core_read_description (struct gdbarch *gdbarch, + gdbarch_core_read_description_ftype core_read_description) +{ + gdbarch->core_read_description = core_read_description; +} + /* Keep a registry of per-architecture data-pointers required by GDB modules. */ |