commit 12fb288b309af44de0b6709d80d172be852368ad Author: Vladimir Prus Date: Fri Jan 8 17:07:44 2010 +0300 Fix issues preventing '-exec-run --all' from work. * linux-nat.c (linux_nat_wait_1): When getting event in undesired inferior, do not try to resume it and get SIGSTOP. In non-stop, do not try to cancel breakpoints. diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index bf0a5f1..682949d 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -3419,20 +3419,9 @@ retry: if (WIFSTOPPED (lp->status)) { - if (WSTOPSIG (lp->status) != SIGSTOP) - { - stop_callback (lp, NULL); - - /* Resume in order to collect the sigstop. */ - ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0, 0); - - stop_wait_callback (lp, NULL); - } - else - { - lp->stopped = 1; - lp->signalled = 0; - } + lp->stopped = 1; + if (WSTOPSIG (lp->status) == SIGSTOP) + lp->signalled = 0; } else if (WIFEXITED (status) || WIFSIGNALED (status)) { @@ -3621,7 +3610,8 @@ retry: /* Now that we've selected our final event LWP, cancel any breakpoints in other LWPs that have hit a GDB breakpoint. See the comment in cancel_breakpoints_callback to find out why. */ - iterate_over_lwps (minus_one_ptid, cancel_breakpoints_callback, lp); + if (!non_stop) + iterate_over_lwps (minus_one_ptid, cancel_breakpoints_callback, lp); if (WIFSTOPPED (status) && WSTOPSIG (status) == SIGTRAP) {