Blame SOURCES/gdb-rhbz1186918-gdbserver-in-container-7of8.patch

2c2fa1
http://sourceware.org/ml/gdb-patches/2016-03/msg00246.html
2c2fa1
Subject: [patch] Suggest running gdbserver for a PID in container
2c2fa1
2c2fa1
2c2fa1
--azLHFNyN32YCQGCU
2c2fa1
Content-Type: text/plain; charset=us-ascii
2c2fa1
Content-Disposition: inline
2c2fa1
2c2fa1
Hi,
2c2fa1
2c2fa1
currently
2c2fa1
	gdb -p <pid from a container>
2c2fa1
will print:
2c2fa1
	warning: Target and debugger are in different PID namespaces; thread lists and other data are likely unreliable
2c2fa1
2c2fa1
BTW it is a bit lost in all the other messages.  Full screen output is in:
2c2fa1
	https://sourceware.org/bugzilla/show_bug.cgi?id=19828
2c2fa1
2c2fa1
It correctly states the problem but it does not say how to solve it.
2c2fa1
2c2fa1
Is at least this little suggestion OK?
2c2fa1
2c2fa1
Originally I wanted to suggest also the Docker "-p 1234:1234" parameter but
2c2fa1
I see the containers are more general topic than just Docker (even LxC etc.).
2c2fa1
2c2fa1
According to Gary future GDBs should be able to work even without gdbserver.
2c2fa1
But currently gdbserver is still required.
2c2fa1
2c2fa1
2c2fa1
Thanks,
2c2fa1
Jan
2c2fa1
2c2fa1
--azLHFNyN32YCQGCU
2c2fa1
Content-Type: text/plain; charset=us-ascii
2c2fa1
Content-Disposition: inline; filename=1
2c2fa1
2c2fa1
gdb/ChangeLog
2c2fa1
2016-03-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
2c2fa1
2c2fa1
	* linux-thread-db.c (check_pid_namespace_match): Extend the message.
2c2fa1
2c2fa1
Index: gdb-7.6.1/gdb/linux-thread-db.c
2c2fa1
===================================================================
2c2fa1
--- gdb-7.6.1.orig/gdb/linux-thread-db.c	2016-03-17 22:06:28.765832372 +0100
2c2fa1
+++ gdb-7.6.1/gdb/linux-thread-db.c	2016-03-17 22:07:06.918107721 +0100
2c2fa1
@@ -1265,7 +1265,8 @@
2c2fa1
 	{
2c2fa1
 	  warning (_ ("Target and debugger are in different PID "
2c2fa1
 		      "namespaces; thread lists and other data are "
2c2fa1
-		      "likely unreliable"));
2c2fa1
+		      "likely unreliable.  "
2c2fa1
+		      "Connect to gdbserver inside the container."));
2c2fa1
 	}
2c2fa1
 
2c2fa1
       xfree (our_pid_ns);