7fffb15818
e86a0cc13a5d91ba95242690237bb77511500897. - Don't apply patches gdb-rhel5-gcc44.patch, gdb-6.6-buildid-locate-rpm-scl.patch, gdb-readline62-ask-more-rh.patch, gdb-6.8-attach-signalled-detach-stopped.patch, gdb-6.8-quit-never-aborts.patch, gdb-rhel5-compat.patch; retained to have same structure as fedoras package. - Add gdb-testsuite-nohostid.patch (from fedora). - Remove gdb-fix-attach-signalled-detach-stopped.patch again (as base not applied), gdb-ppc-ptrace.diff (not applied since some time). OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=93
30 lines
944 B
Diff
30 lines
944 B
Diff
Index: gdb-7.7/gdb/linux-nat.c
|
|
===================================================================
|
|
--- gdb-7.7.orig/gdb/linux-nat.c 2014-02-09 19:18:24.048554459 +0100
|
|
+++ gdb-7.7/gdb/linux-nat.c 2014-02-09 19:19:22.210622806 +0100
|
|
@@ -1529,8 +1529,22 @@ get_pending_status (struct lwp_info *lp,
|
|
gdb_signal_to_string (signo));
|
|
}
|
|
|
|
- if (*status == 0 && ptid_get_pid (lp->ptid) == pid_was_stopped)
|
|
- *status = W_STOPCODE (SIGSTOP);
|
|
+ /* Workaround RHEL-5 kernel which has unreliable PTRACE_DETACH, SIGSTOP (that
|
|
+ many TIDs are left unstopped). See RH Bug 496732. */
|
|
+ if (ptid_get_pid (lp->ptid) == pid_was_stopped)
|
|
+ {
|
|
+ int err;
|
|
+
|
|
+ errno = 0;
|
|
+ err = kill_lwp (ptid_get_lwp (lp->ptid), SIGSTOP);
|
|
+ if (debug_linux_nat)
|
|
+ {
|
|
+ fprintf_unfiltered (gdb_stdlog,
|
|
+ "SC: lwp kill %d %s\n",
|
|
+ err,
|
|
+ errno ? safe_strerror (errno) : "ERRNO-OK");
|
|
+ }
|
|
+ }
|
|
|
|
return 0;
|
|
}
|