3 ms·
Am I missing something? this seems trivial.... $ sudo gdb --args ping -c1 google.com ... Reading symbols from ping...(no debugging symbols found).
by theamk 5y ago
Am I missing something? this seems trivial....
$ sudo gdb --args ping -c1 google.com
...
Reading symbols from ping...(no debugging symbols found)...done.
(gdb) break bind
Breakpoint 1 at 0x2e30
(gdb) run
Starting program: /bin/ping -c1 google.com
Breakpoint 1, bind () at ../sysdeps/unix/syscall-template.S:78
78 ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) bt
#0 bind () at ../sysdeps/unix/syscall-template.S:78
#1 0x00007fe80c66967c in __check_pf (seen_ipv4=seen_ipv4@entry=0x7ffd63cff8e2, seen_ipv6=seen_ipv6@entry=0x7ffd63cff8e3, in6ai=in6ai@entry=0x7ffd63cff8f0,
in6ailen=in6ailen@entry=0x7ffd63cff8f8) at ../sysdeps/unix/sysv/linux/check_pf.c:326
#2 0x00007fe80c630651 in __GI_getaddrinfo (name=<optimized out>, service=<optimized out>, hints=<optimized out>, pai=0x7ffd63cffdc0)
at ../sysdeps/posix/getaddrinfo.c:2354
#3 0x000055c067f89870 in ?? ()
#4 0x00007fe80c549bf7 in __libc_start_main (main=0x55c067f88ff0, argc=3, argv=0x7ffd63cfff28, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>,
stack_end=0x7ffd63cfff18) at ../csu/libc-start.c:310
#5 0x000055c067f89caa in ?? ()
yes, this is getaddrinfo. If you want to debug more, install the debug packages and play with gdb.