This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/18368] gdb with nsenter attaches to wrong process
- From: "gbenson at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 05 May 2015 09:18:12 +0000
- Subject: [Bug gdb/18368] gdb with nsenter attaches to wrong process
- Auto-submitted: auto-generated
- References: <bug-18368-4717 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18368
--- Comment #1 from Gary Benson <gbenson at redhat dot com> ---
You're using nsenter to enter the PID namespace but you're not entering the
corresponding mount namespace; GDB is looking in the wrong /proc. Try adding
"-m" to your nsenter options.
Also, I can't imagine how using the docker daemon as a reference can work. As
I understand it the docker daemon does not switch namespaces, so "nsenter -t
$DOCKERPID" should just stay in whatever namespaces you were already in.
If you're building from source, try this branch:
git clone -b namespaces https://github.com/gbenson/binutils-gdb.git
With that GDB you should be able to attach with "gdb -p $HOSTPID" (where
$HOSTPID is 29120 in your example).
Let me know if/how you get this working please.
--
You are receiving this mail because:
You are on the CC list for the bug.