Sign in

username:

password:



Not a member?

Search Online Books



Search tips

Free Online Books

Ads

Chapters

Chapter Contents:

Search Physical Audio Signal Processing

  

Book Index | Global Index


Would you like to be notified by email when Julius Orion Smith III publishes a new entry into his blog?

  

Useful commands in gdb

Below is a useful subset of gdb commands, listed roughly in the order they might be needed. The first column gives the command, with optional characters enclosed in [square brackets]. For example, the run command can be abbreviated r. The second column gives a short description of the command. Type help <command> in gdb to obtain more information on each command.



r[un] Run to next breakpoint or to end
s[tep] Single-step, descending into functions
n[ext] Single-step without descending into functions
fin[ish] Finish current function, loop, etc. (useful!)
c[ontinue] Continue to next breakpoint or end
up Go up one context level on stack (to caller)
do[wn] Go down one level (only possible after up)
p[rint] $ <$name$ >$ Print value of variable called $ <$name$ >$
p/x $ <$name$ >$ Print value of $ <$name$ >$ in hex format
p $ <$name$ >$@$ <$n$ >$ print $ <$n$ >$ values starting at $ <$name$ >$
p $ <$chars$ >$$ <$tab$ >$ List all variables starting with $ <$chars$ >$
b[reak] $ <$name$ >$ Set a breakpoint at function $ <$name$ >$
b $ <$class$ >$::$ <$name$ >$ Set a breakpoint at $ <$name