Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
- Copyright (C) 2014 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-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"...
- Reading symbols from ./busybox_unstripped...done.
- (gdb) run wget http://skarnet.org/
- Starting program: /home/ska/tmp/busybox/compile/busybox_unstripped wget http://skarnet.org/
- Connecting to skarnet.org ([2001:4b98:dc0:41:216:3eff:fe4f:d7aa]:80)
- Program received signal SIGSEGV, Segmentation fault.
- __fflush_unlocked (f=f@entry=0x0) at src/stdio/fflush.c:6
- 6 if (f->wpos > f->wbase) {
- (gdb) bt
- #0 __fflush_unlocked (f=f@entry=0x0) at src/stdio/fflush.c:6
- #1 0x0000000000405dfc in fflush_all () at libbb/xfuncs_printf.c:298
- #2 0x0000000000405966 in bb_verror_msg (s=s@entry=0x4914f5 "can't open '%s'", p=p@entry=0x7fffffffe638, strerr=0x4889da <errmsg+154> "File exists") at libbb/verror_msg.c:91
- #3 0x0000000000405762 in bb_perror_msg_and_die (s=s@entry=0x4914f5 "can't open '%s'") at libbb/perror_msg.c:27
- #4 0x0000000000405c26 in xopen3 (pathname=0x6a3120 "index.html", flags=<optimized out>, mode=mode@entry=438) at libbb/xfuncs_printf.c:137
- #5 0x0000000000405c32 in xopen (pathname=<optimized out>, flags=<optimized out>) at libbb/xfuncs_printf.c:145
- #6 0x000000000041954a in download_one_url (url=<optimized out>) at networking/wget.c:1257
- #7 wget_main (argc=<optimized out>, argv=<optimized out>) at networking/wget.c:1398
- #8 0x0000000000404ded in run_applet_no_and_exit (applet_no=198, argv=argv@entry=0x7fffffffe900) at libbb/appletlib.c:880
- #9 0x0000000000404f7f in run_applet_and_exit (name=0x7fffffffeba0 "wget", argv=argv@entry=0x7fffffffe900) at libbb/appletlib.c:897
- #10 0x0000000000404f65 in busybox_main (argv=0x7fffffffe900) at libbb/appletlib.c:840
- #11 run_applet_and_exit (name=0x7fffffffeb8d "busybox_unstripped", argv=argv@entry=0x7fffffffe8f8) at libbb/appletlib.c:890
- #12 0x0000000000404fec in main (argc=<optimized out>, argv=0x7fffffffe8f8) at libbb/appletlib.c:977
- (gdb) i reg
- rax 0x7fffffffe5ca 140737488348618
- rbx 0x6 6
- rcx 0x7fffffffe5a0 140737488348576
- rdx 0x0 0
- rsi 0x499e87 4824711
- rdi 0x0 0
- rbp 0x2b 0x2b
- rsp 0x7fffffffe560 0x7fffffffe560
- r8 0x8080808080808080 -9187201950435737472
- r9 0xfefefefefefefeff -72340172838076673
- r10 0xfefefefefefefeff -72340172838076673
- r11 0x0 0
- r12 0x1 1
- r13 0xb 11
- r14 0x4914f5 4789493
- r15 0x4889da 4753882
- rip 0x47b9b8 0x47b9b8 <__fflush_unlocked+1>
- eflags 0x10246 [ PF ZF IF RF ]
- cs 0x33 51
- ss 0x2b 43
- ds 0x0 0
- es 0x0 0
- fs 0x63 99
- gs 0x0 0
- (gdb) i proc map
- process 997149
- Mapped address spaces:
- Start Addr End Addr Size Offset objfile
- 0x400000 0x4a0000 0xa0000 0x0 /home/ska/tmp/busybox/compile/busybox_unstripped
- 0x69f000 0x6a0000 0x1000 0x9f000 /home/ska/tmp/busybox/compile/busybox_unstripped
- 0x6a0000 0x6a4000 0x4000 0x0 [heap]
- 0x2aaaaaaab000 0x2aaaaaaad000 0x2000 0x0 [vdso]
- 0x2aaaaaaad000 0x2aaaaaaaf000 0x2000 0x0 [vvar]
- 0x7ffffffde000 0x7ffffffff000 0x21000 0x0 [stack]
- 0xffffffffff600000 0xffffffffff601000 0x1000 0x0 [vsyscall]
- (gdb) disas $rip-20,+40
- Dump of assembler code from 0x47b9a4 to 0x47b9cc:
- 0x000000000047b9a4 <ferror+31>: add %eax,0x480874c0(%rbp)
- 0x000000000047b9aa <ferror+37>: mov %ebp,%edi
- 0x000000000047b9ac <ferror+39>: callq 0x48398f <__unlockfile>
- 0x000000000047b9b1 <ferror+44>: mov %ebx,%eax
- 0x000000000047b9b3 <ferror+46>: pop %rdx
- 0x000000000047b9b4 <ferror+47>: pop %rbx
- 0x000000000047b9b5 <ferror+48>: pop %rbp
- 0x000000000047b9b6 <ferror+49>: retq
- 0x000000000047b9b7 <__fflush_unlocked+0>: push %rbx
- => 0x000000000047b9b8 <__fflush_unlocked+1>: mov 0x38(%rdi),%rax
- 0x000000000047b9bc <__fflush_unlocked+5>: mov %rdi,%rbx
- 0x000000000047b9bf <__fflush_unlocked+8>: cmp %rax,0x28(%rdi)
- 0x000000000047b9c3 <__fflush_unlocked+12>: ja 0x47b9e2 <__fflush_unlocked+43>
- 0x000000000047b9c5 <__fflush_unlocked+14>: mov 0x8(%rbx),%rsi
- 0x000000000047b9c9 <__fflush_unlocked+18>: mov 0x10(%rbx),%rax
- End of assembler dump.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement