Frequently Used Commands
GDB offers a bewilderingly large number of commands, but most users can get by with just a small handful. Table 17-1 lists the ones that you are likely to use most often.
|
Command |
Purpose |
Examples |
|
|
Show call trace |
|
|
|
Set breakpoint at routine entry or at line number |
|
|
| ||
|
|
Continue from breakpoint |
|
|
|
Remove breakpoint |
|
|
|
Step until end of routine |
|
|
|
List current breakpoints |
|
|
|
Step to next statement and over routine calls |
|
|
|
Print expression |
|
|
|
(Re)run program, optionally with arguments |
|
|
| ||
|
|
Step to next statement and into routines |
|
|
|
Examine memory |
|
|
|
Continue execution until reaching a source line |
|
|
|
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access