diff --git a/gdb-upstream.patch b/gdb-upstream.patch index 1e5d59f..e60e67a 100644 --- a/gdb-upstream.patch +++ b/gdb-upstream.patch @@ -153,3 +153,63 @@ index 1eb457d..ce60beb 100644 -- 2.5.0 + + +http://sourceware.org/ml/gdb-patches/2016-03/msg00246.html +Subject: [patch] Suggest running gdbserver for a PID in container + + +--azLHFNyN32YCQGCU +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline + +Hi, + +currently + gdb -p +will print: + warning: Target and debugger are in different PID namespaces; thread lists and other data are likely unreliable + +BTW it is a bit lost in all the other messages. Full screen output is in: + https://sourceware.org/bugzilla/show_bug.cgi?id=19828 + +It correctly states the problem but it does not say how to solve it. + +Is at least this little suggestion OK? + +Originally I wanted to suggest also the Docker "-p 1234:1234" parameter but +I see the containers are more general topic than just Docker (even LxC etc.). + +According to Gary future GDBs should be able to work even without gdbserver. +But currently gdbserver is still required. + + +Thanks, +Jan + +--azLHFNyN32YCQGCU +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline; filename=1 + +gdb/ChangeLog +2016-03-15 Jan Kratochvil + + * linux-thread-db.c (check_pid_namespace_match): Extend the message. + +diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c +index 1eb457d..21166bf 100644 +--- a/gdb/linux-thread-db.c ++++ b/gdb/linux-thread-db.c +@@ -1020,7 +1020,8 @@ check_pid_namespace_match (void) + { + warning (_ ("Target and debugger are in different PID " + "namespaces; thread lists and other data are " +- "likely unreliable")); ++ "likely unreliable. " ++ "Connect to gdbserver inside the container.")); + } + } + } + +--azLHFNyN32YCQGCU-- + diff --git a/gdb.spec b/gdb.spec index 0266af9..c2aa597 100644 --- a/gdb.spec +++ b/gdb.spec @@ -27,7 +27,7 @@ Version: 7.11 # 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. -Release: 60%{?dist} +Release: 61%{?dist} 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 @@ -1393,6 +1393,9 @@ then fi %changelog +* Thu Mar 17 2016 Jan Kratochvil - 7.11-61.fc24 +- Add message suggesting gdbserver for non-matching PID namespaces. + * Tue Mar 15 2016 Jan Kratochvil - 7.11-60.fc24 - New Fedora GDB testfile: rhbz1261564-aarch64-watchpoint.exp - Backport gdb-7.11 stable branch PR gdb/19676 fix (Pedro Alves).