Constants
$、$n、$$、$$n、$_、$__、$cdir、$cwd、$fp、$pc、$ps、$sp
File resolution
file::variable
GDB Commands
Command | Purpose | Examples |
backtrace | 显示调用栈 | ba |
break | 在某处或者某行设置断点 | b main b parser.c:777 |
continue | 从断点处继续执行 | cont |
delete | 删除断点 | d 3 |
finish | 执行到结束 | fin |
info breakpoints | 列出所有断点 | i br |
next | 执行到下一语句,跳过 | ne |
显示表达式/值 | print 1.0/2.0 | |
run | 执行或重新执行 | ru ru -u -o foo < data |
step | 下一语句,进入 | s |
Alias | Short for ... | notes | Alias | Short for ... | notes | |
bt | backtrace | i | info | |||
c、cont | continue | l | list | |||
d | delete | n | next | |||
dir | directory | ni | nexti | |||
do | down | p | ||||
e | edit | po | print-object | |||
f | frame | r | run | |||
fo | forward-search | s | step | |||
gcore | generate-core-file | share | sharedlibrary | |||
h | help | si | stepi | |||
dis | disable | u | until | |||
b | breakpoint | where | backtrace | |||
clear | file | 设置要调试的文件 | ||||
call | 执行函数 | kill | ||||
display | 每次暂停时显示值 | thread | ||||
attach/detach | show | |||||
return | finish | |||||
q | quit | |||||