开启core, 采集程序崩溃端状态

vi /etc/profile

ulimit -S -c unlimited > /dev/null 2>&1

source /etc/profile

 

将崩溃文件记录下来

vi /etc/sysctl.conf

kernel.core_pattern = ./core_%t_%p_%e

kernel.core_uses_pid = 1

sysctl -p /etc/sysctl.conf

 

gdb 程序名 core.2

相关文章: