diff options
author | David Smith <dsmith@redhat.com> | 2001-04-06 17:53:39 +0000 |
---|---|---|
committer | David Smith <dsmith@redhat.com> | 2001-04-06 17:53:39 +0000 |
commit | e02bc4cc30e0425abebd623e4decd1bf37b9e3da (patch) | |
tree | c5adb383a78c39a2db58c5bed0ee16fa06be484d /gdb/gdbarch.c | |
parent | 1b2b2c1600019ff8869bb0d0bc9b1e42913c8c17 (diff) | |
download | binutils-gdb-e02bc4cc30e0425abebd623e4decd1bf37b9e3da.tar.gz |
2001-04-06 David Smith <dsmith@redhat.com>
* arch-utils.c (default_prepare_to_proceed)
(generic_prepare_to_proceed): Added new functions.
* arch-utils.h: New function declarations for
default_prepare_to_proceed() and generic_prepare_to_proceed().
* gdbarch.sh: Added PREPARE_TO_PROCEED.
* gdbarch.c: Regenerated.
* gdbarch.h: Regenerated.
* inferior.h: Added get_last_target_status() declaration.
* infrun.c (get_last_target_status): Added new function.
(handle_inferior_event): Saves last pid and waitstatus, which will
get returned by get_last_target_status().
* hppa-tdep.c (prepare_to_proceed): Added comment stating that
prepare_to_proceed() is potentially redundant since
default_prepare_to_proceed() has been added.
* linux-thread.c (prepare_to_proceed): Ditto.
* lin-lwp.c (prepare_to_proceed): Ditto.
* m3-nat.c (prepare_to_proceed): Ditto.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r-- | gdb/gdbarch.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 5735315c2fd..d84e41deb57 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -226,6 +226,7 @@ struct gdbarch gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint; gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint; CORE_ADDR decr_pc_after_break; + gdbarch_prepare_to_proceed_ftype *prepare_to_proceed; CORE_ADDR function_start_offset; gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address; CORE_ADDR frame_args_skip; @@ -380,6 +381,7 @@ struct gdbarch startup_gdbarch = 0, 0, 0, + 0, /* startup_gdbarch() */ }; @@ -457,6 +459,7 @@ gdbarch_alloc (const struct gdbarch_info *info, gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint; gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint; gdbarch->decr_pc_after_break = -1; + gdbarch->prepare_to_proceed = default_prepare_to_proceed; gdbarch->function_start_offset = -1; gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address; gdbarch->frame_args_skip = -1; @@ -710,6 +713,7 @@ verify_gdbarch (struct gdbarch *gdbarch) && (gdbarch->decr_pc_after_break == -1)) internal_error (__FILE__, __LINE__, "gdbarch: verify_gdbarch: decr_pc_after_break invalid"); + /* Skip verify of prepare_to_proceed, invalid_p == 0 */ if ((GDB_MULTI_ARCH >= 2) && (gdbarch->function_start_offset == -1)) internal_error (__FILE__, __LINE__, @@ -1320,6 +1324,12 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n", XSTRING (DECR_PC_AFTER_BREAK)); #endif +#ifdef PREPARE_TO_PROCEED + fprintf_unfiltered (file, + "gdbarch_dump: %s # %s\n", + "PREPARE_TO_PROCEED(select_it)", + XSTRING (PREPARE_TO_PROCEED (select_it))); +#endif #ifdef FUNCTION_START_OFFSET fprintf_unfiltered (file, "gdbarch_dump: FUNCTION_START_OFFSET # %s\n", @@ -2034,6 +2044,13 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n", (long) DECR_PC_AFTER_BREAK); #endif +#ifdef PREPARE_TO_PROCEED + if (GDB_MULTI_ARCH) + fprintf_unfiltered (file, + "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n", + (long) current_gdbarch->prepare_to_proceed + /*PREPARE_TO_PROCEED ()*/); +#endif #ifdef FUNCTION_START_OFFSET fprintf_unfiltered (file, "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n", @@ -3868,6 +3885,24 @@ set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, gdbarch->decr_pc_after_break = decr_pc_after_break; } +int +gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it) +{ + if (gdbarch->prepare_to_proceed == 0) + internal_error (__FILE__, __LINE__, + "gdbarch: gdbarch_prepare_to_proceed invalid"); + if (gdbarch_debug >= 2) + fprintf_unfiltered (gdb_stdlog, "gdbarch_prepare_to_proceed called\n"); + return gdbarch->prepare_to_proceed (select_it); +} + +void +set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, + gdbarch_prepare_to_proceed_ftype prepare_to_proceed) +{ + gdbarch->prepare_to_proceed = prepare_to_proceed; +} + CORE_ADDR gdbarch_function_start_offset (struct gdbarch *gdbarch) { |