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