Linux下生成core dump文件的配置及对core文件的分析
作者:互联网
目录
1.环境配置(core 文件生成条件)
1.文件路径配置
kernel.core_pattern = /var/crash/core-%e-%s-%u-%g-%p-%t
// 添加到/etc/sysctl.conf
//参数说明
%e is the filename
%g is the gid the process was running under
%p is the pid of the process
%s is the signal that caused the dump
%t is the time the dump occurred
%u is the uid the process was running under
sysctl -p
//使配置生效
2.core文件大小配置
ulimit -c unlimited
//unlimited 可替换为固定值
3.可选配置
程序编译选项添加 -g 选项会生成调试信息
4.参考
2. 使用 gdb 对 coredump 文件进行分析
标签:-%,core,dump,文件,process,配置,gdb 来源: https://www.cnblogs.com/fushengduoshaoji/p/16586727.html