docs:programming:debugging:gdb

gdb

  • compile executables with '-g' to generate debugging information (see 4.1 in gdb manual)
  • usage: gdb <program>
break [function name|line number|* address]

delete [breakpointno] (delete breakpoint no or all breakpoints)

run [> outfile]

bt (backtrace)

s (step into)

c (continue)

n (next, step over)

set args <arg1> <arg2> ...

show args

info locals

info breakpoints

disable <breakpointno>

display <expr> (automatic display list)

info display

undisplay <displayno>

disable display <displayno>

enable display <displayno>
  • docs/programming/debugging/gdb.txt
  • Last modified: 2008/08/03 00:25
  • by 127.0.0.1