gdb加载core dump文件

ulimit -a

ulimit -c unlimited

 

运行程序,例如程序名为abcdefg:

abcdefg -U puber -d testindex -p 5432 -h 192.168.31.67 --slot myslot --start

此时程序崩溃,会生成一个core.XXXX的文件

 

运行gdb,加载程序和core文件:

gdb highgo_recvlogical -c core.XXXX

在gdb内运行如下命令,加载参数,运行程序,打印调用栈:

set args -U puber -d testindex -p 5432 -h 192.168.31.67 --slot myslot --start

run

bt