summaryrefslogtreecommitdiff
path: root/gdb/event-top.c
diff options
context:
space:
mode:
authorPedro Alves <pedro@codesourcery.com>2008-09-08 21:46:21 +0000
committerPedro Alves <pedro@codesourcery.com>2008-09-08 21:46:21 +0000
commit8e8a9c178a2794662975e1aaa92024c92622230f (patch)
tree544e7ae3ee61ec4fb9ca4b88a8dcf4832ce6aa8d /gdb/event-top.c
parent5e291f9222009c70187d6c77f5e4e6edbd53e221 (diff)
downloadgdb-8e8a9c178a2794662975e1aaa92024c92622230f.tar.gz
* inferior.h (stop_bpstat): Delete.
* breakpoint.h (bpstat_do_actions): Remove bpstat* argument. * breakpoint.c (bpstat_do_actions): Rename to ... (bpstat_do_actions_1): ... this. Make static. Change return type to int. Return true if a breakpoint proceeded. (bpstat_do_actions): New, as wrapper around bpstat_do_actions_1. (delete_breakpoint): Don't reference the global stop_bpstat; it's gone. * gdbthread.h (struct thread_info): Add stop_bpstat. (save_infrun_state, load_infrun_state): Remove stop_bpstat argument. * thread.c (load_infrun_state, save_infrun_state): Remove stop_bpstat argument, and the code referencing it. * infcall.c: Include "gdbthread.h". (call_function_by_hand): Adjust. * exceptions.c: Include "gdbthread.h". (throw_exception): Adjust. * infcmd.c (stop_bpstat): Delete. (continue_command): In all-stop, set the ignore count on the thread that reported the stop. In non-stop, set it on the current thread. (finish_command_continuation): Adjust. (program_info): Adjust. * infrun.c (clear_proceed_status): Adjust. (context_switch): Don't context-switch stop_bpstat. (handle_inferior_event): Adjust. (normal_stop): Adjust. (save_inferior_status, restore_inferior_status): Adjust. * inf-loop.c (inferior_event_handler): Remove parameter to bpstat_do_actions call. * top.c (command_loop): Remove parameter to bpstat_do_actions call. Call it unconditionally. * event-top.c (command_handler): Ditto. * python/python.c (execute_gdb_command): Ditto.
Diffstat (limited to 'gdb/event-top.c')
-rw-r--r--gdb/event-top.c44
1 files changed, 18 insertions, 26 deletions
diff --git a/gdb/event-top.c b/gdb/event-top.c
index 61c431dabf2..df01a1f8987 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -478,7 +478,6 @@ async_disable_stdin (void)
static void
command_handler (char *command)
{
- struct cleanup *old_chain;
int stdin_is_tty = ISATTY (stdin);
long time_at_cmd_start;
#ifdef HAVE_SBRK
@@ -490,7 +489,6 @@ command_handler (char *command)
quit_flag = 0;
if (instream == stdin && stdin_is_tty)
reinitialize_more_filter ();
- old_chain = make_cleanup (null_cleanup, 0);
/* If readline returned a NULL command, it means that the
connection with the terminal is gone. This happens at the
@@ -515,35 +513,29 @@ command_handler (char *command)
execute_command (command, instream == stdin);
- /* Do any commands attached to breakpoint we stopped at. Only if we
- are always running synchronously. Or if we have just executed a
- command that doesn't start the target. */
- if (!target_can_async_p () || is_stopped (inferior_ptid))
- {
- bpstat_do_actions (&stop_bpstat);
- do_cleanups (old_chain);
+ /* Do any commands attached to breakpoint we stopped at. */
+ bpstat_do_actions ();
- if (display_time)
- {
- long cmd_time = get_run_time () - time_at_cmd_start;
+ if (display_time)
+ {
+ long cmd_time = get_run_time () - time_at_cmd_start;
- printf_unfiltered (_("Command execution time: %ld.%06ld\n"),
- cmd_time / 1000000, cmd_time % 1000000);
- }
+ printf_unfiltered (_("Command execution time: %ld.%06ld\n"),
+ cmd_time / 1000000, cmd_time % 1000000);
+ }
- if (display_space)
- {
+ if (display_space)
+ {
#ifdef HAVE_SBRK
- char *lim = (char *) sbrk (0);
- long space_now = lim - lim_at_start;
- long space_diff = space_now - space_at_cmd_start;
-
- printf_unfiltered (_("Space used: %ld (%c%ld for this command)\n"),
- space_now,
- (space_diff >= 0 ? '+' : '-'),
- space_diff);
+ char *lim = (char *) sbrk (0);
+ long space_now = lim - lim_at_start;
+ long space_diff = space_now - space_at_cmd_start;
+
+ printf_unfiltered (_("Space used: %ld (%c%ld for this command)\n"),
+ space_now,
+ (space_diff >= 0 ? '+' : '-'),
+ space_diff);
#endif
- }
}
}