1 Index: gdb-7.2.50.20101116/gdb/linux-nat.c
2 ===================================================================
3 --- gdb-7.2.50.20101116.orig/gdb/linux-nat.c 2010-11-16 07:58:15.000000000 +0100
4 +++ gdb-7.2.50.20101116/gdb/linux-nat.c 2010-11-16 07:59:06.000000000 +0100
5 @@ -1863,16 +1863,18 @@ resume_set_callback (struct lwp_info *lp
8 linux_nat_resume (struct target_ops *ops,
9 - ptid_t ptid, int step, enum target_signal signo)
10 + ptid_t ptid, int step_int, enum target_signal signo)
15 + enum resume_step step = step_int;
18 fprintf_unfiltered (gdb_stdlog,
19 "LLR: Preparing to %s %s, %s, inferior_ptid %s\n",
20 - step ? "step" : "resume",
21 + (step == RESUME_STEP_NEEDED
22 + ? "needed" : (step ? "step" : "resume")),
23 target_pid_to_str (ptid),
24 (signo != TARGET_SIGNAL_0
25 ? strsignal (target_signal_to_host (signo)) : "0"),
26 @@ -3171,10 +3173,34 @@ linux_nat_filter_event (int lwpid, int s
28 if (num_lwps (GET_PID (lp->ptid)) > 1)
30 + enum resume_step step = lp->step;
31 + pid_t pid = GET_PID (lp->ptid);
33 /* If there is at least one more LWP, then the exit signal
34 was not the end of the debugged application and should be
38 + if (step == RESUME_STEP_USER)
40 + /* Now stop the closest LWP's ... */
41 + lp = find_lwp_pid (pid_to_ptid (pid));
44 + gdb_assert (lp != NULL);
46 + ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0,
47 + (void *) (unsigned long) SIGSTOP);
48 + if (debug_linux_nat)
49 + fprintf_unfiltered (gdb_stdlog,
50 + "PTRACE_CONT %s, 0, 0 (%s)\n",
51 + target_pid_to_str (lp->ptid),
52 + errno ? safe_strerror (errno)
54 + /* Avoid the silent `delayed SIGSTOP' handling. */