摘自:https://github.com/hellogcc/100-gdb-tips/blob/master/src/quit-gdb-silently.md.
我只是摘抄我平时没注意到的,或者我认为重要的
- gdb退出时不显示提示信息
set confirm off
- 列出所有的函数
info functions 或者 info functions th[列出所有以th开始的函数]
- 进入不带调试
当函数带有调试信息时,gdb时,s(step)可以进入,但是当函数不带调试信息时,是不能进入的.需要设置**set step-mode on**.
- 退出正在调试的函数
使用fin 或者return expression
例子参见 http://www.cnblogs.com/457220157-FTD/articles/5358935.html
- 直接执行函数
call func_name() 或者 print func_name()
例子参见 http://www.cnblogs.com/457220157-FTD/articles/5358935.html