C/C++ 调试器:
gdb
GDB调试基础命令
| command | description |
|---|---|
| help [command] | 命令帮助 |
Enter key | 重复执行上一条命令 |
| file <executable> | 加载可执行文件 |
| run [args] | 启动调试程序 |
| break <file:line> [if condition]|<function anme> | 添加(条件)断点 |
| continue | 继续执行到下一个断点 |
| step | 程序执行,前进一行(step into) |
| next | 程序执行,前进一条语句(step over) |
| finish | 运行直到当前函数调用结束 |
| watch <variable> | 观察点变量被暂停程序执行,打印变量的新旧值 |
| print <variable> | 查看变量的值 |
| delete <breakpoint number> | 删除断点 |
| backtrace|bt|where | 打印线程执行的栈帧 |
| info <subcommand> | 展示调试信息(info breakpoints、info threads) |