This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/18368] gdb with nsenter attaches to wrong process


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]