📄 gdb-test1.txt
字号:
swpig@linux:~> lsDocuments public_htmlswpig@linux:~> cd Documentsswpig@linux:~/Documents> lsgcc gdb ICS Pictures Presentations Texts toolsswpig@linux:~/Documents> cd ICSswpig@linux:~/Documents/ICS> lsasm.txt~ bomb1191 bomb-d.txt bomb-t.txt bomb-t.txt~ handout_lab2.pdfswpig@linux:~/Documents/ICS> objdump bomb1191 > bomb-d1.txtUsage: objdump <option(s)> <file(s)> Display information from object <file(s)>. At least one of the following switches must be given: -a, --archive-headers Display archive header information -f, --file-headers Display the contents of the overall file header -p, --private-headers Display object format specific file header contents -h, --[section-]headers Display the contents of the section headers -x, --all-headers Display the contents of all headers -d, --disassemble Display assembler contents of executable sections -D, --disassemble-all Display assembler contents of all sections -S, --source Intermix source code with disassembly -s, --full-contents Display the full contents of all sections requested -g, --debugging Display debug information in object file -G, --stabs Display (in raw form) any STABS info in the file -t, --syms Display the contents of the symbol table(s) -T, --dynamic-syms Display the contents of the dynamic symbol table -r, --reloc Display the relocation entries in the file -R, --dynamic-reloc Display the dynamic relocation entries in the file -v, --version Display this program's version number -i, --info List object formats and architectures supported -H, --help Display this informationswpig@linux:~/Documents/ICS> objdump bomb1191 >> bomb-d1.txtUsage: objdump <option(s)> <file(s)> Display information from object <file(s)>. At least one of the following switches must be given: -a, --archive-headers Display archive header information -f, --file-headers Display the contents of the overall file header -p, --private-headers Display object format specific file header contents -h, --[section-]headers Display the contents of the section headers -x, --all-headers Display the contents of all headers -d, --disassemble Display assembler contents of executable sections -D, --disassemble-all Display assembler contents of all sections -S, --source Intermix source code with disassembly -s, --full-contents Display the full contents of all sections requested -g, --debugging Display debug information in object file -G, --stabs Display (in raw form) any STABS info in the file -t, --syms Display the contents of the symbol table(s) -T, --dynamic-syms Display the contents of the dynamic symbol table -r, --reloc Display the relocation entries in the file -R, --dynamic-reloc Display the dynamic relocation entries in the file -v, --version Display this program's version number -i, --info List object formats and architectures supported -H, --help Display this informationswpig@linux:~/Documents/ICS> objdump -d bomb1191 >> bomb-d1.txtswpig@linux:~/Documents/ICS> lsasm.txt~ bomb-d1.txt bomb-t.txt handout_lab2.pdfbomb1191 bomb-d.txt bomb-t.txt~swpig@linux:~/Documents/ICS> gdb bomb1191GNU gdb 5.3Copyright 2002 Free Software Foundation, Inc.GDB is free software, covered by the GNU General Public License, and you arewelcome to change it and/or distribute copies of it under certain conditions.Type "show copying" to see the conditions.There is absolutely no warranty for GDB. Type "show warranty" for details.This GDB was configured as "i586-suse-linux"...(gdb) break explodeBreakpoint 1 at 0x8048cb6(gdb) break stage3Breakpoint 2 at 0x80490fd(gdb) break stage4Breakpoint 3 at 0x8049225(gdb) break stage5Breakpoint 4 at 0x804929d(gdb) break *0x8049105Breakpoint 5 at 0x8049105(gdb) break *0x8049127Breakpoint 6 at 0x8049127(gdb) runStarting program: /home/swpig/Documents/ICS/bomb1191please enter password for stage 1: 165124You successfully passed stage 1. please enter password for stage 2: 16383You successfully passed stage 2. please enter password for stage 3: 37647 Breakpoint 2, 0x080490fd in stage3 ()(gdb) sSingle stepping until exit from function stage3,which has no line number information. Breakpoint 5, 0x08049105 in stage3 ()(gdb) x/d(%ecx)A parse error in expression, near `%ecx)'.(gdb) x/d($ebp+0xc)0xbffff624: 37647(gdb) x/d($ebp+0x8)0xbffff620: 37647(gdb) x/d($eax)0x80490f4 <stage3>: -2082109099(gdb) x/d($ecx)0x930f: Cannot access memory at address 0x930f(gdb) x/d($ebx)0x930f: Cannot access memory at address 0x930f(gdb) x/d($edi)0x0: Cannot access memory at address 0x0(gdb) x/d($esi)0x2: Cannot access memory at address 0x2(gdb) x/d($ecx)0x930f: Cannot access memory at address 0x930f(gdb) x/d($ebx)0x930f: Cannot access memory at address 0x930f(gdb) print /x $ebx$1 = 0x930f(gdb) print x/d $ebxNo symbol "x" in current context.(gdb) print /d $ebx$2 = 37647(gdb) /d $ecxUndefined command: "". Try "help".(gdb) print /d $ecx$3 = 37647(gdb) sSingle stepping until exit from function stage3,which has no line number information. Breakpoint 6, 0x08049127 in stage3 ()(gdb) print /d $edx$4 = 0(gdb) print /d $eax$5 = 0(gdb) print /d $ecx$6 = 0(gdb) print /d $esi$7 = 0(gdb) sSingle stepping until exit from function stage3,which has no line number information.0x08048880 in main ()(gdb) sSingle stepping until exit from function main,which has no line number information.You successfully passed stage 3. please enter password for stage 4:Program received signal SIGINT, Interrupt.0x400e0df4 in read () from /lib/i686/libc.so.6(gdb) killKill the program being debugged? (y or n) y(gdb) clearNo source file specified.(gdb) deleteDelete all breakpoints? (y or n) y(gdb) break explodeBreakpoint 7 at 0x8048cb6(gdb) break stage4Breakpoint 8 at 0x8049225(gdb) break *0x8049232Breakpoint 9 at 0x8049232(gdb) break *0x8049250Breakpoint 10 at 0x8049250(gdb) break *0x8049269Breakpoint 11 at 0x8049269(gdb) break *0x8049275Breakpoint 12 at 0x8049275(gdb) break *0x804927fBreakpoint 13 at 0x804927f(gdb) break stage5Breakpoint 14 at 0x804929d(gdb) break stage6Breakpoint 15 at 0x804931e(gdb) rStarting program: /home/swpig/Documents/ICS/bomb1191please enter password for stage 1: 165124You successfully passed stage 1. please enter password for stage 2: 16383You successfully passed stage 2. please enter password for stage 3: 37647You successfully passed stage 3. please enter password for stage 4: 656636 Breakpoint 8, 0x08049225 in stage4 ()(gdb) print /x $esi$8 = 0x3(gdb) print /d $esi$9 = 3(gdb) sSingle stepping until exit from function stage4,which has no line number information. Breakpoint 9, 0x08049232 in stage4 ()(gdb) print /d $esi$10 = 656636(gdb) print /d $ecx$11 = 393251(gdb)$12 = 393251(gdb) print /d $eax$13 = -2004318071(gdb) print /d $edx$14 = -2004318071(gdb) print /d $ecx$15 = 393251(gdb) sSingle stepping until exit from function stage4,which has no line number information. Breakpoint 10, 0x08049250 in stage4 ()(gdb) print /d $ecx$16 = 393251(gdb) print /d $eax$17 = 2021161081(gdb) print /d $edx$18 = 26216(gdb) sSingle stepping until exit from function stage4,which has no line number information. Breakpoint 11, 0x08049269 in stage4 ()(gdb) print /d $ebx$19 = 18(gdb) print /d $ecx$20 = 393251(gdb) print /d $eax$21 = 393244(gdb) print /d $edi$22 = 23132(gdb) sSingle stepping until exit from function stage4,which has no line number information. Breakpoint 12, 0x08049275 in stage4 ()(gdb) print /d $eax$23 = 4(gdb) print /d $ecx$24 = 393251(gdb) print /d $edx$25 = 7(gdb) print /d $ebx$26 = 18(gdb) print /d $edi$27 = 4(gdb) print /d $esi$28 = 656636(gdb) sSingle stepping until exit from function stage4,which has no line number information. Breakpoint 13, 0x0804927f in stage4 ()(gdb) print /d $eax$29 = 2(gdb) print /d $edi$30 = 4(gdb) killKill the program being debugged? (y or n) y(gdb) sThe program is not being run.(gdb) runStarting program: /home/swpig/Documents/ICS/bomb1191please enter password for stage 1: 165124You successfully passed stage 1. please enter password for stage 2: 16383You successfully passed stage 2. please enter password for stage 3: 82563 Breakpoint 7, 0x08048cb6 in explode ()(gdb) killKill the program being debugged? (y or n) y(gdb) runStarting program: /home/swpig/Documents/ICS/bomb1191please enter password for stage 1: 165124You successfully passed stage 1. please enter password for stage 2: 16383You successfully passed stage 2. please enter password for stage 3: 37647You successfully passed stage 3. please enter password for stage 4: 8275150 Breakpoint 8, 0x08049225 in stage4 ()(gdb) sSingle stepping until exit from function stage4,which has no line number information. Breakpoint 9, 0x08049232 in stage4 ()(gdb) sSingle stepping until exit from function stage4,which has no line number information. Breakpoint 10, 0x08049250 in stage4 ()(gdb) sSingle stepping until exit from function stage4,which has no line number information. Breakpoint 11, 0x08049269 in stage4 ()(gdb) sSingle stepping until exit from function stage4,which has no line number information. Breakpoint 12, 0x08049275 in stage4 ()(gdb) print /d $eax$31 = 4(gdb) print /d $edi$32 = 4(gdb) sSingle stepping until exit from function stage4,which has no line number information. Breakpoint 13, 0x0804927f in stage4 ()(gdb) print /d $edi$33 = 4(gdb) print /d $eax$34 = 7(gdb) killKill the program being debugged? (y or n) y(gdb) runStarting program: /home/swpig/Documents/ICS/bomb1191please enter password for stage 1: 165124You successfully passed stage 1. please enter password for stage 2: 16383You successfully passed stage 2. please enter password for stage 3: 37647You successfully passed stage 3. please enter password for stage 4: 19840430 Breakpoint 8, 0x08049225 in stage4 ()(gdb) sSingle stepping until exit from function stage4,which has no line number information. Breakpoint 9, 0x08049232 in stage4 ()(gdb) sSingle stepping until exit from function stage4,which has no line number information. Breakpoint 10, 0x08049250 in stage4 ()(gdb) sSingle stepping until exit from function stage4,which has no line number information. Breakpoint 11, 0x08049269 in stage4 ()(gdb) sSingle stepping until exit from function stage4,which has no line number information. Breakpoint 12, 0x08049275 in stage4 ()(gdb) print /d $eax$35 = 4(gdb) print /d $edi$36 = 4(gdb) sSingle stepping until exit from function stage4,which has no line number information. Breakpoint 13, 0x0804927f in stage4 ()(gdb) print /d $edi$37 = 4(gdb) print /d $eax$38 = 6(gdb) killKill the program being debugged? (y or n) y(gdb) runStarting program: /home/swpig/Documents/ICS/bomb1191please enter password for stage 1: 165124You successfully passed stage 1. please enter password for stage 2: 16383You successfully passed stage 2. please enter password for stage 3: 37647You successfully passed stage 3. please enter password for stage 4: 55070287 Breakpoint 8, 0x08049225 in stage4 ()(gdb) sSingle stepping until exit from function stage4,which has no line number information. Breakpoint 9, 0x08049232 in stage4 ()(gdb) sSingle stepping until exit from function stage4,which has no line number information. Breakpoint 10, 0x08049250 in stage4 ()(gdb) sSingle stepping until exit from function stage4,which has no line number information. Breakpoint 11, 0x08049269 in stage4 ()(gdb) sSingle stepping until exit from function stage4,which has no line number information. Breakpoint 12, 0x08049275 in stage4 ()(gdb) print /d $eax$39 = 4(gdb) print /d $edi$40 = 4(gdb) sSingle stepping until exit from function stage4,which has no line number information. Breakpoint 13, 0x0804927f in stage4 ()(gdb) print /d $edi$41 = 4(gdb) print /d $eax$42 = 5(gdb) killKill the program being debugged? (y or n) y(gdb) runStarting program: /home/swpig/Documents/ICS/bomb1191please enter password for stage 1: 165124You successfully passed stage 1. please enter password for stage 2: 16383You successfully passed stage 2. please enter password for stage 3: 37647You successfully passed stage 3. please enter password for stage 4: 82751500 Breakpoint 8, 0x08049225 in stage4 ()(gdb) sSingle stepping until exit from function stage4,which has no line number information. Breakpoint 9, 0x08049232 in stage4 ()(gdb) sSingle stepping until exit from function stage4,which has no line number information. Breakpoint 10, 0x08049250 in stage4 ()(gdb) sSingle stepping until exit from function stage4,which has no line number information. Breakpoint 11, 0x08049269 in stage4 ()(gdb) sSingle stepping until exit from function stage4,which has no line number information. Breakpoint 12, 0x08049275 in stage4 ()(gdb) print /d $eax$43 = 4(gdb) print /d $edi
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -