1 Index: gdb-7.4.50.20120602/gdb/linux-nat.c
2 ===================================================================
3 --- gdb-7.4.50.20120602.orig/gdb/linux-nat.c 2012-06-02 20:54:30.000000000 +0200
4 +++ gdb-7.4.50.20120602/gdb/linux-nat.c 2012-06-02 20:56:03.966493352 +0200
5 @@ -1816,8 +1816,22 @@ get_pending_status (struct lwp_info *lp,
6 gdb_signal_to_string (signo));
9 - if (*status == 0 && GET_PID (lp->ptid) == pid_was_stopped)
10 - *status = W_STOPCODE (SIGSTOP);
11 + /* Workaround RHEL-5 kernel which has unreliable PTRACE_DETACH, SIGSTOP (that
12 + many TIDs are left unstopped). See RH Bug 496732. */
13 + if (GET_PID (lp->ptid) == pid_was_stopped)
18 + err = kill_lwp (GET_LWP (lp->ptid), SIGSTOP);
19 + if (debug_linux_nat)
21 + fprintf_unfiltered (gdb_stdlog,
22 + "SC: lwp kill %d %s\n",
24 + errno ? safe_strerror (errno) : "ERRNO-OK");