Start the debugger

gdbStart gdb
gdb [program]Debug program
gdb --args [program] [argument(s)]Debug program with argument
gdb [program] [pid]Debug program and attach to process
gdb [program] [core]Debug coredump core produced by program

Executing program

run [arglist]Start program
killKill running program

TUI

tui [enable/disable]Switch tui on and off
C-lClear screen

Execution Control

continue [count]c [count]Continue running
step [count]s [count]Execute until another line reached
next [count]n [count]Execute next line, including any function calls
jump [line]Resume execution at specified line number

Info

backtrace [n] bt [n]Print trace of all frames in stack; or of n frames
print [expr]Show value of expr

Breakpoints & Watchpoints

break bSet breakpoint at next instruction
break [file:][line]Set breakpoint at line number in file
break [file:][func]Set breakpoint at func in file
~break [+/-offset]Set break at offset lines from current stop
watch [expr]Set a watchpoint for expression
catch [event]Break at event: catch, throw, exec, fork, vfork, load or unload
clearDelete breakpoints at next instruction
delete [n]Delete breakpoints; or breakpoint n