Basics:

  • gdb —args foo.exe rest args
  • br function : set a breakpoint
  • delete function : delete a breakpoint. No argument ⇒ delete all
  • r : run
  • c : continue running
  • bt : show backtrace
  • step : executes next line, goes into functions
  • stepi : executes next assembly instruction, goes into functions
  • next, nexti : like step, but skips over functions
  • set disassemble-next-line on : show disassembly when stepping
  • info threads : print info about threads
  • info reg : print info about registers print a register
  • p $xmm0 print a register
  • p/x $rcx : print register in hex
  • x/4 : display memory 4 words at a given
  • set {int}0xaddr = 4 : write to memory

Links:

Go to index of articles.

Share on