To the next problem. My book tells me to debug the program a.out that I have written and saved. However I am not getting the same results executing the command as are given in the book. The second line is the first thing I am missing completely in my output. I also have no idea if this is spitted out or typed in my me as when I press enter after a.out my next line results in "(gdb)". The following result is what I should get:
This is the result I am getting:Code:reader:~/booksrc $ gdb -q ./a.out Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". (gdb) break main Breakpoint 1 at 0x804837a (gdb) run Starting program: /home/reader/booksrc/a.out Breakpoint 1, 0x0804837a in main () (gdb) info registers eax 0xbffff894 -1073743724 ecx 0x48e0fe81 1222704769 edx 0x1 1 ebx 0xb7fd6ff4 -1208127500 esp 0xbffff800 0xbffff800 ebp 0xbffff808 0xbffff808 esi 0xb8000ce0 -1207956256 edi 0x0 0 eip 0x804837a 0x804837a <main+6> eflags 0x286 [ PF SF IF ] cs 0x73 115 ss 0x7b 123 ds 0x7b 123 es 0x7b 123 fs 0x0 0 gs 0x33 51 (gdb) quit The program is running. Exit anyway? (y or n) y reader:~/booksrc $
Code:root:~#gdb -q ./a.out (no debugging symbols found) (gdb) break main Breakpoint 1 at 0x804837a (gdb) run Starting program: /root/a.out (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) Breakpoint 1 at 0x804837a in main () (gdb)



LinkBack URL
About LinkBacks


