GDB-Tips

From Technologia Incognita
Revision as of 20:54, 23 December 2013 by MRieback (talk | contribs) (Created page with "= Useful gdb commands = * p or p/x (for hex) - Print an expression * x or x/32wx (for 32 Hex words) - Show memory at location * break - set a breakpoint (include a * to start ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Useful gdb commands

  • p or p/x (for hex) - Print an expression
  • x or x/32wx (for 32 Hex words) - Show memory at location
  • break - set a breakpoint (include a * to start raw memory addresses)
  • continue - start execution after breakpoint
  • ni/si - execute the next instruction - skip calls or don't
  • display - like x, but reprints the output prior to each prompt
  • info reg - information about registers
  • info frame - info about the current Stack frame (ebp-esp)
  • bt - backtrace
  • help

Breakpoints

  • Breakpoint for each call:
  • break *0x<address of call1>
  • break *0x<address of call2>
  • etc..

Display Settings

  • DISPLAY SETTINGS/Basic
  • display/i $pc
  • display/x $edx
  • display/x $ecx
  • display/x $ebx
  • display/x $eax
  • display/32wx $ebp-92
  • display/32xw $esp