Script started on Fri Sep 19 14:51:13 2003 linux3% nasm -f elf rep.asm linux3% ld rep.o linux3% linux3% gdb a.out GNU gdb Red Hat Linux (5.2-2) Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome 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 "i386-redhat-linux"...(no debugging symbols found)... (gdb) display/i $eip (gdb) display/x $edi (gdb) display $ecx (gdb) display/c $ebx (gdb) display/c $eax (gdb) break *find Breakpoint 1 at 0x8048081 (gdb) break *erase Breakpoint 2 at 0x8048095 (gdb) break *alldone Breakpoint 3 at 0x80480a4 (gdb) run Starting program: /afs/umbc.edu/users/c/h/chang/home/asm/a.out Breakpoint 1, 0x08048081 in find () 5: /c $eax = 0 '\0' 4: /c $ebx = 0 '\0' 3: $ecx = 0 2: /x $edi = 0x0 1: x/i $eip 0x8048081 : mov al,0x6f (gdb) x/14cb &msg 0x80490b0 : 72 'H' 101 'e' 108 'l' 108 'l' 111 'o' 44 ',' 32 ' ' 119 'w' 0x80490b8 : 111 'o' 114 'r' 108 'l' 100 'd' 10 '\n' 0 '\0' (gdb) si 0x08048083 in find () 5: /c $eax = 111 'o' 4: /c $ebx = 0 '\0' 3: $ecx = 0 2: /x $edi = 0x0 1: x/i $eip 0x8048083 : mov edi,0x80490b0 (gdb) 0x08048088 in find () 5: /c $eax = 111 'o' 4: /c $ebx = 0 '\0' 3: $ecx = 0 2: /x $edi = 0x80490b0 1: x/i $eip 0x8048088 : mov ecx,0xd (gdb) 0x0804808d in find () 5: /c $eax = 111 'o' 4: /c $ebx = 0 '\0' 3: $ecx = 13 2: /x $edi = 0x80490b0 1: x/i $eip 0x804808d : cld (gdb) 0x0804808e in find () 5: /c $eax = 111 'o' 4: /c $ebx = 0 '\0' 3: $ecx = 13 2: /x $edi = 0x80490b0 1: x/i $eip 0x804808e : repnz scas al,es:[edi] (gdb) 0x0804808e in find () 5: /c $eax = 111 'o' 4: /c $ebx = 0 '\0' 3: $ecx = 12 2: /x $edi = 0x80490b1 1: x/i $eip 0x804808e : repnz scas al,es:[edi] (gdb) 0x0804808e in find () 5: /c $eax = 111 'o' 4: /c $ebx = 0 '\0' 3: $ecx = 11 2: /x $edi = 0x80490b2 1: x/i $eip 0x804808e : repnz scas al,es:[edi] (gdb) 0x0804808e in find () 5: /c $eax = 111 'o' 4: /c $ebx = 0 '\0' 3: $ecx = 10 2: /x $edi = 0x80490b3 1: x/i $eip 0x804808e : repnz scas al,es:[edi] (gdb) 0x0804808e in find () 5: /c $eax = 111 'o' 4: /c $ebx = 0 '\0' 3: $ecx = 9 2: /x $edi = 0x80490b4 1: x/i $eip 0x804808e : repnz scas al,es:[edi] (gdb) 0x08048090 in find () 5: /c $eax = 111 'o' 4: /c $ebx = 0 '\0' 3: $ecx = 8 2: /x $edi = 0x80490b5 1: x/i $eip 0x8048090 : jne 0x8048095 (gdb) 0x08048092 in find () 5: /c $eax = 111 'o' 4: /c $ebx = 0 '\0' 3: $ecx = 8 2: /x $edi = 0x80490b5 1: x/i $eip 0x8048092 : mov bl,BYTE PTR [edi-1] (gdb) Breakpoint 2, 0x08048095 in not_found () 5: /c $eax = 111 'o' 4: /c $ebx = 111 'o' 3: $ecx = 8 2: /x $edi = 0x80490b5 1: x/i $eip 0x8048095 : mov edi,0x80490b0 (gdb) 0x0804809a in not_found () 5: /c $eax = 111 'o' 4: /c $ebx = 111 'o' 3: $ecx = 8 2: /x $edi = 0x80490b0 1: x/i $eip 0x804809a : mov ecx,0xd (gdb) 0x0804809f in not_found () 5: /c $eax = 111 'o' 4: /c $ebx = 111 'o' 3: $ecx = 13 2: /x $edi = 0x80490b0 1: x/i $eip 0x804809f : mov al,0x3f (gdb) 0x080480a1 in not_found () 5: /c $eax = 63 '?' 4: /c $ebx = 111 'o' 3: $ecx = 13 2: /x $edi = 0x80490b0 1: x/i $eip 0x80480a1 : cld (gdb) 0x080480a2 in not_found () 5: /c $eax = 63 '?' 4: /c $ebx = 111 'o' 3: $ecx = 13 2: /x $edi = 0x80490b0 1: x/i $eip 0x80480a2 : repz stos es:[edi],al (gdb) 0x080480a2 in not_found () 5: /c $eax = 63 '?' 4: /c $ebx = 111 'o' 3: $ecx = 12 2: /x $edi = 0x80490b1 1: x/i $eip 0x80480a2 : repz stos es:[edi],al (gdb) 0x080480a2 in not_found () 5: /c $eax = 63 '?' 4: /c $ebx = 111 'o' 3: $ecx = 11 2: /x $edi = 0x80490b2 1: x/i $eip 0x80480a2 : repz stos es:[edi],al (gdb) cont Continuing. Breakpoint 3, 0x080480a4 in alldone () 5: /c $eax = 63 '?' 4: /c $ebx = 111 'o' 3: $ecx = 0 2: /x $edi = 0x80490bd 1: x/i $eip 0x80480a4 : mov ebx,0x0 (gdb) x/14cb &msg 0x80490b0 : 63 '?' 63 '?' 63 '?' 63 '?' 63 '?' 63 '?' 63 '?' 63 '?' 0x80490b8 : 63 '?' 63 '?' 63 '?' 63 '?' 63 '?' 0 '\0' (gdb) cont Continuing. Program exited normally. (gdb) quit linux3% exit exit Script done on Fri Sep 19 14:53:17 2003