Skip to content

Instantly share code, notes, and snippets.

@qoelet
Created May 8, 2012 21:03
Show Gist options
  • Save qoelet/2639262 to your computer and use it in GitHub Desktop.
Save qoelet/2639262 to your computer and use it in GitHub Desktop.
(gdb) break 11
(gdb) # some output from gdb confirming we laid a breakpoint
(gdb) run
(gdb) # gdb output, runs program till line 11
(gdb) # let's check register EAX
(gdb) p/x $eax
$1 = 0x0
(gdb) # let's run a few "stepi" till that line "mov eax,4" is executed
(gdb) stepi
(gdb) stepi
(gdb) # and we examine EAX again
(gdb) p/x $eax
$2 = 0x4
(gdb) # sweet :D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment