Exercise on using the 'gdb' debugger with our 'esp.s' program ------------------------------------------------------------- 1) preparing to use the debugger: $ as -g esp.s -o esp.o $ as -g eax2hex.s -o eax2hex.o $ ld esp.o eax2hex.o -o esp $ gdb esp 2) Executing the application under control of the debugger: (gdb) li // list instructions (gdb) b 27 // set breakpoint (gdb) run // run until breakpoint is hit (gdb) i r // inspect CPU registers (gdb) stepi // single-step one instruction (gdb) cont // continue running program (gdb) quit // terminate the debugger