]> git.pld-linux.org Git - packages/gdb.git/blob - gdb-rhel5-compat.patch
- typo
[packages/gdb.git] / gdb-rhel5-compat.patch
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));
7      }
8  
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)
14 +    {
15 +      int err;
16 +
17 +      errno = 0;
18 +      err = kill_lwp (GET_LWP (lp->ptid), SIGSTOP);
19 +      if (debug_linux_nat)
20 +       {
21 +         fprintf_unfiltered (gdb_stdlog,
22 +                             "SC:  lwp kill %d %s\n",
23 +                             err,
24 +                             errno ? safe_strerror (errno) : "ERRNO-OK");
25 +       }
26 +    }
27  
28    return 0;
29  }
This page took 0.418847 seconds and 3 git commands to generate.