detach-as-stopped kernel workaround is now always active, not just on RHEL-5.
This commit is contained in:
parent
be6e797e00
commit
1bbb88d597
|
@ -79,6 +79,35 @@ Index: gdb-7.0.50.20100115/gdb/linux-nat.c
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Convert a native/host siginfo object, into/from the siginfo in the
|
/* Convert a native/host siginfo object, into/from the siginfo in the
|
||||||
|
Index: gdb-7.0.50.20100115/gdb/linux-nat.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.0.50.20100115.orig/gdb/linux-nat.c 2010-01-15 22:19:27.000000000 +0100
|
||||||
|
+++ gdb-7.0.50.20100115/gdb/linux-nat.c 2010-01-15 22:19:55.000000000 +0100
|
||||||
|
@@ -1768,8 +1768,22 @@ GPT: lwp %s had signal %s, but it is in
|
||||||
|
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;
|
||||||
|
}
|
||||||
Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.threads/attach-stopped.exp
|
Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.threads/attach-stopped.exp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2010-01-01 08:32:06.000000000 +0100
|
--- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2010-01-01 08:32:06.000000000 +0100
|
||||||
|
|
|
@ -38,32 +38,3 @@ Index: gdb-7.0.50.20100115/gdb/corelow.c
|
||||||
|
|
||||||
static void
|
static void
|
||||||
build_id_locate_exec (int from_tty)
|
build_id_locate_exec (int from_tty)
|
||||||
Index: gdb-7.0.50.20100115/gdb/linux-nat.c
|
|
||||||
===================================================================
|
|
||||||
--- gdb-7.0.50.20100115.orig/gdb/linux-nat.c 2010-01-15 22:19:27.000000000 +0100
|
|
||||||
+++ gdb-7.0.50.20100115/gdb/linux-nat.c 2010-01-15 22:19:55.000000000 +0100
|
|
||||||
@@ -1768,8 +1768,22 @@ GPT: lwp %s had signal %s, but it is in
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
5
gdb.spec
5
gdb.spec
|
@ -27,7 +27,7 @@ Version: 7.2
|
||||||
|
|
||||||
# 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: 49%{?_with_upstream:.upstream}%{dist}
|
Release: 50%{?_with_upstream:.upstream}%{dist}
|
||||||
|
|
||||||
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and GFDL and BSD and Public Domain
|
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and GFDL and BSD and Public Domain
|
||||||
Group: Development/Debuggers
|
Group: Development/Debuggers
|
||||||
|
@ -1468,6 +1468,9 @@ fi
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Mar 23 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2-50.fc14
|
||||||
|
- detach-as-stopped kernel workaround is now always active, not just on RHEL-5.
|
||||||
|
|
||||||
* Wed Mar 23 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2-49.fc14
|
* Wed Mar 23 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.2-49.fc14
|
||||||
- [ifunc] Fix ppc64 function descriptors compatibility.
|
- [ifunc] Fix ppc64 function descriptors compatibility.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue