$ gdb /bin/ls
GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
...
Reading symbols from /bin/ls...(no debugging symbols found)...done.
(gdb)
gdb 設常用的 system call 如 open
12
(gdb) b open
Breakpoint 1 at 0x3d30
執行程式
123456
(gdb) r
Starting program: /bin/ls
Breakpoint 1, __libc_open64 (file=file@entry=0x7ffff7df6428 "/etc/ld.so.cache", oflag=oflag@entry=524288)
at ../sysdeps/unix/sysv/linux/open64.c:39
39 ../sysdeps/unix/sysv/linux/open64.c: No such file or directory.
(gdb) dump memory vdso 0x7ffff7ffa000 0x7ffff7ffc000
(gdb) quit
A debugging session is active.
Inferior 1 [process 30094] will be killed.
Quit anyway? (y or n) y
看dump 檔案 symbol
123456789101112
$ file vdso
vdso: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=cef5ed3c3dc2b39082ae093560c168a8b427ebb6, stripped
$ nm -D vdso
0000000000000a30 W clock_gettime
0000000000000f30 W getcpu
0000000000000d40 W gettimeofday
0000000000000000 A LINUX_2.6
0000000000000f10 W time
0000000000000a30 T __vdso_clock_gettime
0000000000000f30 T __vdso_getcpu
0000000000000d40 T __vdso_gettimeofday
0000000000000f10 T __vdso_time