This quick-reference table is copyright 2002 Robert M. Dondero, Jr., and is used by permission in this book. Parameters listed in brackets are optional.
|
Miscellaneous |
|
|---|---|
|
quit |
Exit GDB |
|
help [cmd] |
Print description of debugger command cmd. Without cmd, prints a list of topics. |
|
directory [dir1] [dir2] ... |
Add directories dir1, dir2, etc. to the list of directories searched for source files. |
|
Running the Program |
|
|---|---|
|
run [arg1] [arg2] ... |
Run the program with command line arguments arg1, arg2, etc. |
|
set args arg1 [arg2] ... |
Set the program's command-line arguments to arg1, arg2, etc. |
|
show args |
Print the program's command-line arguments. |
|
Stepping through the Program |
|
|---|---|
|
nexti |
"Step over" the next instruction (doesn't follow function calls). |
|
stepi |
"Step into" the next instruction (follows function calls). |
|
finish |
"Step out" of the current function. |