ReadingList:
简述:
gcc -g -o hello hello.c
ulimit -c unlimited
gdb {executable} {dump file} eg. gdb hello core.1324
(gdb) bt //查看出错时的堆栈
(bt = backtrace .. prints stack strace)
(gdb) frame {num} eg. (gdb) frame 2
and use:
(gdb) info locals //查看局部变量
(gdb) info args //查看参数
Segmentation fault(core dumped) 调试
原文:http://www.cnblogs.com/bohaoist/p/5116685.html