Apache Awk Bash C cftp daemontools DHCP djbdns DNS Emacs Email ezmlm Fetchmail find GDB Hardware HTML HTTP Intro ISDN less Make Math mc mirrordir MySQL Peripherals Perl PHP3 pppd qmail Regexps Shell System Tables test To do Typical ucspi-tcp Versions Index TCP/IP slides

GDB commands

Command Result Example
Running
run Run the program r
step Runs the program until execution reaches a different source line s
next Runs the program until execution reaches the next source line, does not step into called functions n
finish Runs the program until a return from the current funciont occurs fin
continue Continues execution c
Breakpoints
break FUNCTION Set a breakpoint at the entry to function FUNCTION br main
break LINENUM Set a breakpoint at line LINENUM br 1000
tbreak FUNCTION Set a one time only breakpoint at the entry to function FUNCTION tb main
tbreak LINENUM Set a one time only breakpoint at line LINENUM tb 1000
rbreak REGEX Set a breakpoint at the entry to functions whose names match REGEX rb ^db.*$
info breakpoints List all breakpoints inf b
clear FUNCTION Clears any breakpoints at the entry to function FUNCTION cl main
clear LINENUM Clears any breakpoints at line LINENUM cl 1000
Execution stack
backtrace Displays the calling stack bt
Source listing and evaluation
list LINENUM Lists source lines centered around line LINENUM l 1000
list FUNCTION Lists source lines centered around lthe start of function FUNCTION l main
print EXP Prints the result of expression EXP (given in the source language) p 2+2
Last update: Wed, 2 Nov 2005 10:16:21 GMT