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