From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12030 invoked by alias); 5 May 2015 15:26:06 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 11993 invoked by uid 48); 5 May 2015 15:26:04 -0000 From: "raghu.prabhu13 at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/18368] gdb with nsenter attaches to wrong process Date: Tue, 05 May 2015 15:26:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 7.9 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: raghu.prabhu13 at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q2/txt/msg00224.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=18368 --- Comment #4 from Raghavendra --- So, I did try with namespaces branch and it works great. sudo gdb -p 31802 GNU gdb (GDB) 7.9.50.20150429-cvs Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-unknown-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word". Attaching to process 31802 Reading symbols from target:/usr/bin/sleep...Reading symbols from target:/usr/bin/sleep...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from target:/lib64/libc.so.6...(no debugging symbols found)...done. Reading symbols from target:/lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done. warning: Target and debugger are in different PID namespaces; thread lists and other data are likely unreliable 0x00007fdaa0a74470 in __nanosleep_nocancel () from target:/lib64/libc.so.6 (gdb) bt #0 0x00007fdaa0a74470 in __nanosleep_nocancel () from target:/lib64/libc.so.6 #1 0x0000000000403e5f in rpl_nanosleep () #2 0x0000000000403cc0 in xnanosleep () #3 0x00000000004016cd in main () (gdb) quit A debugging session is active. Inferior 1 [process 31802] will be detached. Quit anyway? (y or n) y Detaching from program: target:/usr/bin/sleep, process 31802 ================== a) I also verified this from inside container by installing gdb there. (You need a privileged container for that which is strange). b) It still shows the warning - "warning: Target and debugger are in different PID namespaces; thread lists and other data are likely unreliable", is it still required? c) Also, -Werror build fails for that branch: https://github.com/gbenson/binutils-gdb/issues/1 Thanks. -- You are receiving this mail because: You are on the CC list for the bug.