[RHEL5] Workaround kernel for detaching SIGSTOPped processes (BZ 809382).
This commit is contained in:
parent
fdf21a3584
commit
72cb82c2bf
29
gdb-rhel5-compat.patch
Normal file
29
gdb-rhel5-compat.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
Index: gdb-7.2.50.20110328/gdb/linux-nat.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.2.50.20110328.orig/gdb/linux-nat.c 2011-03-28 18:46:16.000000000 +0200
|
||||||
|
+++ gdb-7.2.50.20110328/gdb/linux-nat.c 2011-03-28 18:47:56.000000000 +0200
|
||||||
|
@@ -1774,8 +1774,22 @@ get_pending_status (struct lwp_info *lp,
|
||||||
|
target_signal_to_string (signo));
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (*status == 0 && 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 (GET_PID (lp->ptid) == pid_was_stopped)
|
||||||
|
+ {
|
||||||
|
+ int err;
|
||||||
|
+
|
||||||
|
+ errno = 0;
|
||||||
|
+ err = kill_lwp (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;
|
||||||
|
}
|
11
gdb.spec
11
gdb.spec
@ -35,7 +35,7 @@ Version: 7.4.50.%{snap}
|
|||||||
|
|
||||||
# The release always contains a leading reserved number, start it at 1.
|
# The release always contains a leading reserved number, start it at 1.
|
||||||
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
|
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
|
||||||
Release: 42%{?dist}
|
Release: 43%{?dist}
|
||||||
|
|
||||||
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain
|
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain
|
||||||
Group: Development/Debuggers
|
Group: Development/Debuggers
|
||||||
@ -377,6 +377,10 @@ Patch330: gdb-6.8-bz436037-reg-no-longer-active.patch
|
|||||||
#=push: It was useful only after gdb-6.8-attach-signalled-detach-stopped.patch .
|
#=push: It was useful only after gdb-6.8-attach-signalled-detach-stopped.patch .
|
||||||
Patch331: gdb-6.8-quit-never-aborts.patch
|
Patch331: gdb-6.8-quit-never-aborts.patch
|
||||||
|
|
||||||
|
# [RHEL5] Workaround kernel for detaching SIGSTOPped processes (BZ 809382).
|
||||||
|
#=fedora
|
||||||
|
Patch335: gdb-rhel5-compat.patch
|
||||||
|
|
||||||
# [RHEL5,RHEL6] Fix attaching to stopped processes.
|
# [RHEL5,RHEL6] Fix attaching to stopped processes.
|
||||||
#=fedora
|
#=fedora
|
||||||
Patch337: gdb-6.8-attach-signalled-detach-stopped.patch
|
Patch337: gdb-6.8-attach-signalled-detach-stopped.patch
|
||||||
@ -926,7 +930,9 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
|
|||||||
%patch642 -p1 -R
|
%patch642 -p1 -R
|
||||||
%endif
|
%endif
|
||||||
%patch337 -p1
|
%patch337 -p1
|
||||||
|
%patch335 -p1
|
||||||
%if 0%{!?rhel:1} || 0%{?rhel} > 6
|
%if 0%{!?rhel:1} || 0%{?rhel} > 6
|
||||||
|
%patch335 -p1 -R
|
||||||
%patch337 -p1 -R
|
%patch337 -p1 -R
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -1395,6 +1401,9 @@ fi
|
|||||||
%endif # 0%{!?el5:1} || "%{_target_cpu}" == "noarch"
|
%endif # 0%{!?el5:1} || "%{_target_cpu}" == "noarch"
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Apr 25 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-43.fc17
|
||||||
|
- [RHEL5] Workaround kernel for detaching SIGSTOPped processes (BZ 809382).
|
||||||
|
|
||||||
* Tue Apr 24 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-42.fc17
|
* Tue Apr 24 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-42.fc17
|
||||||
- Update "set auto-load" patchset and the --with-auto-load-safe-path setting.
|
- Update "set auto-load" patchset and the --with-auto-load-safe-path setting.
|
||||||
- [RHEL] Disable gdb-add-index even on RHEL-6 as RHEL-6.0 had too old elfutils.
|
- [RHEL] Disable gdb-add-index even on RHEL-6 as RHEL-6.0 had too old elfutils.
|
||||||
|
Loading…
Reference in New Issue
Block a user