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: "raghu.prabhu13 at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 05 May 2015 14:50:21 +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 #2 from Raghavendra <raghu.prabhu13 at gmail dot com> ---
>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
You are right. The namespace remains same for daemon as is the docker client.
>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.
I did try - nsenter-t 25057 -p -m gdb -p 1 - but this fails since gdb is not
present there.
(where 25057 is the pid of process inside container - in this case sleep
100000)
>If you're building from source, try this branch:
> git clone -b namespaces https://github.com/gbenson/binutils-gdb.git
I will try this and get back.
--
You are receiving this mail because:
You are on the CC list for the bug.