Skip to content

Instantly share code, notes, and snippets.

@andrey-utkin
Created October 29, 2018 15:01
Show Gist options
  • Save andrey-utkin/9529ea0c5107c13a1ce7d84d09671b06 to your computer and use it in GitHub Desktop.
Save andrey-utkin/9529ea0c5107c13a1ce7d84d09671b06 to your computer and use it in GitHub Desktop.
$ gdb
GNU gdb (Gentoo 8.1 vanilla) 8.1
Copyright (C) 2018 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-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
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".
(gdb) target remote :5555
Remote debugging using :5555
Reading /bin/sleep from remote target...
warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
Reading /bin/sleep from remote target...
Reading symbols from target:/bin/sleep...Reading /bin/sleep.debug from remote target...
Reading /bin/.debug/sleep.debug from remote target...
Reading symbols from /usr/lib/debug/bin//sleep.debug...done.
done.
Reading /lib64/libc.so.6 from remote target...
Reading /lib64/ld-linux-x86-64.so.2 from remote target...
Reading symbols from target:/lib64/libc.so.6...done.
Reading symbols from target:/lib64/ld-linux-x86-64.so.2...done.
Reading /lib64/ld-linux-x86-64.so.2 from remote target...
0x00007f98d7fe5495 in __GI___nanosleep (requested_time=requested_time@entry=0x7ffc941244a0, remaining=remaining@entry=0x0) at ../sysdeps/unix/sysv/linux/nanosleep.c:27
27 ../sysdeps/unix/sysv/linux/nanosleep.c: No such file or directory.
(gdb) bt
#0 0x00007f98d7fe5495 in __GI___nanosleep (requested_time=requested_time@entry=0x7ffc941244a0, remaining=remaining@entry=0x0) at ../sysdeps/unix/sysv/linux/nanosleep.c:27
#1 0x000056074e2941c3 in rpl_nanosleep (requested_delay=requested_delay@entry=0x7ffc941244e0, remaining_delay=remaining_delay@entry=0x0) at lib/nanosleep.c:85
#2 0x000056074e293fbd in xnanosleep (seconds=<optimized out>) at lib/xnanosleep.c:51
#3 0x000056074e291be8 in main (argc=2, argv=0x7ffc94124648) at src/sleep.c:150
(gdb) file /bin/sleep
Reading symbols from /bin/sleep...Reading symbols from /usr/lib/debug//bin/sleep.debug...done.
done.
(gdb) bt
#0 0x00007f98d7fe5495 in __GI___nanosleep (requested_time=0x7ffc941244a0, remaining=0x0) at ../sysdeps/unix/sysv/linux/nanosleep.c:27
#1 0x000056074e2941c3 in ?? ()
#2 0x00000000001b7740 in ?? ()
#3 0x0000000000000000 in ?? ()
(gdb) show remote exec-file
(null)
(gdb) set remote exec-file /bin/sleep
(gdb) bt
#0 0x00007f98d7fe5495 in __GI___nanosleep (requested_time=0x7ffc941244a0, remaining=0x0) at ../sysdeps/unix/sysv/linux/nanosleep.c:27
#1 0x000056074e2941c3 in ?? ()
#2 0x00000000001b7740 in ?? ()
#3 0x0000000000000000 in ?? ()
(gdb) set sysroot /
(gdb) bt
#0 0x00007f98d7fe5495 in ?? ()
#1 0x0000000000000000 in ?? ()
(gdb) set sysroot /
Reading symbols from /lib64/libc.so.6...done.
Reading symbols from /lib64/ld-linux-x86-64.so.2...done.
(gdb) bt
#0 0x00007f98d7fe5495 in __GI___nanosleep (requested_time=requested_time@entry=0x7ffc941244a0, remaining=remaining@entry=0x0) at ../sysdeps/unix/sysv/linux/nanosleep.c:27
#1 0x000056074e2941c3 in rpl_nanosleep (requested_delay=requested_delay@entry=0x7ffc941244e0, remaining_delay=remaining_delay@entry=0x0) at lib/nanosleep.c:85
#2 0x000056074e293fbd in xnanosleep (seconds=<optimized out>) at lib/xnanosleep.c:51
#3 0x000056074e291be8 in main (argc=2, argv=0x7ffc94124648) at src/sleep.c:150
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment