|
导航:[首页]->[cpp]->[让GDB自动执行命令]
通常我们调试某些程序时,往往需要先设置某些断点等做一系列操作,每一次重启都得这么整一次很麻烦,我们可以在当前目录新建.gitinit文件,然后每行一个命令写。支持shell格式的注释
保留当前的运行状态,使用generate-core-file
批处理使用-batch
##参考
- http://stackoverflow.com/questions/16595417/loading-gdbinit-from-current-directory
- http://stackoverflow.com/questions/3789550/saving-core-file-in-gdb
- http://stackoverflow.com/questions/3999464/how-to-make-gdb-get-stacktrace-repeatably
|