Merge gdb-rhel5-compat.patch into: gdb-6.8-attach-signalled-detach-stopped.patch
This commit is contained in:
parent
13d2cd5e8a
commit
ccd56ac8c9
@ -20,12 +20,26 @@ Index: gdb-7.9.50.20150531/gdb/linux-nat.c
|
|||||||
|
|
||||||
/* The process is definitely stopped. It is in a job control
|
/* The process is definitely stopped. It is in a job control
|
||||||
stop, unless the kernel predates the TASK_STOPPED /
|
stop, unless the kernel predates the TASK_STOPPED /
|
||||||
@@ -1468,6 +1472,9 @@ get_pending_status (struct lwp_info *lp,
|
@@ -1529,6 +1529,23 @@ get_pending_status (struct lwp_info *lp,
|
||||||
gdb_signal_to_string (signo));
|
gdb_signal_to_string (signo));
|
||||||
}
|
}
|
||||||
|
|
||||||
+ if (*status == 0 && ptid_get_pid (lp->ptid) == pid_was_stopped)
|
+ /* Workaround RHEL-5 kernel which has unreliable PTRACE_DETACH, SIGSTOP (that
|
||||||
+ *status = W_STOPCODE (SIGSTOP);
|
+ 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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
12
gdb.spec
12
gdb.spec
@ -27,7 +27,7 @@ Version: 7.10.50.%{snapsrc}
|
|||||||
|
|
||||||
# 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: 39%{?dist}
|
Release: 40%{?dist}
|
||||||
|
|
||||||
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL
|
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL
|
||||||
Group: Development/Debuggers
|
Group: Development/Debuggers
|
||||||
@ -351,11 +351,8 @@ Patch330: gdb-6.8-bz436037-reg-no-longer-active.patch
|
|||||||
#=fedora: It was useful only after gdb-6.8-attach-signalled-detach-stopped.patch .
|
#=fedora: 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.
|
||||||
|
# [RHEL5] Workaround kernel for detaching SIGSTOPped processes (BZ 809382).
|
||||||
#=fedora
|
#=fedora
|
||||||
Patch337: gdb-6.8-attach-signalled-detach-stopped.patch
|
Patch337: gdb-6.8-attach-signalled-detach-stopped.patch
|
||||||
|
|
||||||
@ -884,9 +881,7 @@ find -name "*.info*"|xargs rm -f
|
|||||||
|
|
||||||
%patch337 -p1
|
%patch337 -p1
|
||||||
%patch331 -p1
|
%patch331 -p1
|
||||||
%patch335 -p1
|
|
||||||
%if 0%{!?rhel:1} || 0%{?rhel} > 6
|
%if 0%{!?rhel:1} || 0%{?rhel} > 6
|
||||||
%patch335 -p1 -R
|
|
||||||
%patch331 -p1 -R
|
%patch331 -p1 -R
|
||||||
%patch337 -p1 -R
|
%patch337 -p1 -R
|
||||||
%endif
|
%endif
|
||||||
@ -1401,6 +1396,9 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Jan 9 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.10.50.20160106-40.fc24
|
||||||
|
- Merge gdb-rhel5-compat.patch into: gdb-6.8-attach-signalled-detach-stopped.patch
|
||||||
|
|
||||||
* Sat Jan 9 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.10.50.20160106-39.fc24
|
* Sat Jan 9 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.10.50.20160106-39.fc24
|
||||||
- Simplify .spec: Remove conditional revert of: gdb-readline62-ask-more-rh.patch
|
- Simplify .spec: Remove conditional revert of: gdb-readline62-ask-more-rh.patch
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user