Skip to content

Instantly share code, notes, and snippets.

@randombenj
Last active October 29, 2020 18:19
Show Gist options
  • Save randombenj/e93dc688e1ec36e8e23063b5a34b623c to your computer and use it in GitHub Desktop.
Save randombenj/e93dc688e1ec36e8e23063b5a34b623c to your computer and use it in GitHub Desktop.
A short guide on how to debug x86 assembly code (compiled with nasm for example)

-masm=intel

gdb build/divider

show code: disassemble _lable

run code r

set break points b _lable

or

b *0x0000000000401060 for addresses

inspection

i r

or

i r regname

continue in debug

si next step

c to next breakpoint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment