Script started on Tue Feb 12 09:25:49 2002 linux1% nasm -f elf add.asm linux1% ld add.o linux1% linux1% a.out linux1% linux1% gdb a.out GNU gdb Red Hat Linux 7.x (5.0rh-15) (MI_OUT) Copyright 2001 Free Software Foundation, Inc. ... (gdb) display $eax (gdb) display/i $eip (gdb) (gdb) break *start Breakpoint 1 at 0x8048081 (gdb) run Starting program: /afs/umbc.edu/users/c/h/chang/home/asm/lec05/a.out Breakpoint 1, 0x08048081 in start () 2: x/i $eip 0x8048081 : mov eax,0x11 1: $eax = 0 (gdb) si 0x08048086 in start () 2: x/i $eip 0x8048086 : mov ebx,0x80490d8 1: $eax = 17 (gdb) 0x0804808b in start () 2: x/i $eip 0x804808b : mov ecx,0x9 1: $eax = 17 (gdb) 0x08048090 in start () 2: x/i $eip 0x8048090 : add eax,0x3 1: $eax = 17 (gdb) 0x08048095 in start () 2: x/i $eip 0x8048095 : add eax,ecx 1: $eax = 20 (gdb) 0x08048097 in start () 2: x/i $eip 0x8048097 : add ax,cx 1: $eax = 29 (gdb) 0x0804809a in start () 2: x/i $eip 0x804809a : add eax,ds:0x80490d8 1: $eax = 38 (gdb) 0x080480a0 in start () 2: x/i $eip 0x80480a0 : add eax,DWORD PTR [ebx] 1: $eax = 80 (gdb) 0x080480a2 in start () 2: x/i $eip 0x80480a2 : add ds:0x80490d8,0x5 1: $eax = 122 (gdb) 0x080480ac in start () 2: x/i $eip 0x80480ac : add ds:0x80490d8,eax 1: $eax = 122 (gdb) 0x080480b2 in start () 2: x/i $eip 0x80480b2 : mov esi,0x80490dc 1: $eax = 122 (gdb) 0x080480b7 in start () 2: x/i $eip 0x80480b7 : mov ecx,0x2 1: $eax = 122 (gdb) 0x080480bc in start () 2: x/i $eip 0x80480bc : add eax,DWORD PTR [ecx+134516956] 1: $eax = 122 (gdb) 0x080480c3 in start () 2: x/i $eip 0x80480c3 : add eax,DWORD PTR [esi+ecx] 1: $eax = 124 (gdb) 0x080480c6 in start () 2: x/i $eip 0x80480c6 : add eax,DWORD PTR [esi+ecx+4] 1: $eax = 126 (gdb) 0x080480ca in exit () 2: x/i $eip 0x80480ca : mov ebx,0x0 1: $eax = 129 (gdb) cont Continuing. Program exited normally. (gdb) quit linux1%