diff options
author | Pedro Alves <palves@redhat.com> | 2008-09-22 15:20:08 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2008-09-22 15:20:08 +0000 |
commit | d6b48e9c8beee5d3ab78ac1979f6af0d6de9ae30 (patch) | |
tree | 00f0c2582c9380ba1d33f42285d1919ef65fa391 /gdb/linux-nat.c | |
parent | 82f7388440b4dc733616a6a85e9dfd290089e508 (diff) | |
download | gdb-d6b48e9c8beee5d3ab78ac1979f6af0d6de9ae30.zip gdb-d6b48e9c8beee5d3ab78ac1979f6af0d6de9ae30.tar.gz gdb-d6b48e9c8beee5d3ab78ac1979f6af0d6de9ae30.tar.bz2 |
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.
Diffstat (limited to 'gdb/linux-nat.c')
-rw-r--r-- | gdb/linux-nat.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index c1cb563..5ff4bce 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -1708,9 +1708,17 @@ linux_nat_resume (ptid_t ptid, int step, enum target_signal signo) if (lp->status && WIFSTOPPED (lp->status)) { - int saved_signo = target_signal_from_host (WSTOPSIG (lp->status)); + int saved_signo; + struct inferior *inf; - if (signal_stop_state (saved_signo) == 0 + inf = find_inferior_pid (ptid_get_pid (ptid)); + gdb_assert (inf); + saved_signo = target_signal_from_host (WSTOPSIG (lp->status)); + + /* Defer to common code if we're gaining control of the + inferior. */ + if (inf->stop_soon == NO_STOP_QUIETLY + && signal_stop_state (saved_signo) == 0 && signal_print_state (saved_signo) == 0 && signal_pass_state (saved_signo) == 1) { @@ -2926,10 +2934,17 @@ retry: if (WIFSTOPPED (status)) { int signo = target_signal_from_host (WSTOPSIG (status)); + struct inferior *inf; + + inf = find_inferior_pid (ptid_get_pid (lp->ptid)); + gdb_assert (inf); - /* If we get a signal while single-stepping, we may need special - care, e.g. to skip the signal handler. Defer to common code. */ + /* Defer to common code if we get a signal while + single-stepping, since that may need special care, e.g. to + skip the signal handler, or, if we're gaining control of the + inferior. */ if (!lp->step + && inf->stop_soon == NO_STOP_QUIETLY && signal_stop_state (signo) == 0 && signal_print_state (signo) == 0 && signal_pass_state (signo) == 1) |