From d6b48e9c8beee5d3ab78ac1979f6af0d6de9ae30 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Mon, 22 Sep 2008 15:20:08 +0000 Subject: Make the stop_soon global be per-inferior instead. * infcmd.c (attach_command_post_wait): Adjust. (attach_command): Likewise. * inferior.h (stop_soon): Delete. (struct inferior): Add stop_soon member. * infrun.c (stop_soon): Delete. (clear_proceed_status, start_remote) (fetch_inferior_event, handle_inferior_event): Adjust. (signal_stop_state): Don't check stop_soon here. Check in callers instead. (save_inferior_status, restore_inferior_status): Adjust. * linux-nat.c (linux_nat_resume, linux_nat_wait): Always pass signals to common code if starting up the inferior. * inferior.h (struct inferior_info): Added stop_soon member. * inferior.c (add_inferior) Clear stop_soon. * mips-tdep.c (heuristic_proc_start): Adjust. * nto-procfs.c (procfs_create_inferior): Adjust. * solib-irix.c (irix_solib_create_inferior_hook): Adjust. * solib-osf.c (osf_solib_create_inferior_hook): Adjust. * solib-sunos.c (sunos_solib_create_inferior_hook): Adjust. * solib-svr4.c (svr4_solib_create_inferior_hook): Adjust. * win32-nat.c (do_initial_win32_stuff): Adjust. * alpha-tdep.c (alpha_heuristic_proc_start): Adjust. --- gdb/infcmd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gdb/infcmd.c') diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 6ffc97f..6ed6341 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -1956,8 +1956,10 @@ attach_command_post_wait (char *args, int from_tty, int async_exec) { char *exec_file; char *full_exec_path = NULL; + struct inferior *inferior; - stop_soon = NO_STOP_QUIETLY; + inferior = current_inferior (); + inferior->stop_soon = NO_STOP_QUIETLY; /* If no exec file is yet known, try to determine it from the process itself. */ @@ -2087,12 +2089,14 @@ attach_command (char *args, int from_tty) E.g. Mach 3 or GNU hurd. */ if (!target_attach_no_wait) { + struct inferior *inferior = current_inferior (); + /* Careful here. See comments in inferior.h. Basically some OSes don't ignore SIGSTOPs on continue requests anymore. We need a way for handle_inferior_event to reset the stop_signal variable after an attach, and this is what STOP_QUIETLY_NO_SIGSTOP is for. */ - stop_soon = STOP_QUIETLY_NO_SIGSTOP; + inferior->stop_soon = STOP_QUIETLY_NO_SIGSTOP; if (target_can_async_p ()) { -- cgit v1.1