Skip to content

Instantly share code, notes, and snippets.

@ronin13
Created May 5, 2015 16:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ronin13/4fc2f49152ccb3fc2692 to your computer and use it in GitHub Desktop.
Save ronin13/4fc2f49152ccb3fc2692 to your computer and use it in GitHub Desktop.
GDB with namespace support
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 <http://gnu.org/licenses/gpl.html>
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:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment