在linux调试程序,最痛苦的就是程序异常宕掉,但是找不到core文件,很难定位问题。但是有了core文件就容易定位多了。
一般是可以通过在环境变量中设置ulimit -c unlimited。但是现场实施人员有时会忘记设置这条命令。那么怎么办呢,可以通过设置linux的abrt服务来实现。
修改abrt-action-save-package-data.conf文件
将其修改为:
vi /etc/abrt/abrt-action-save-package-data.conf
# With this option set to "yes",
# only crashes in signed packages will be analyzed.
# the list of public keys used to check the signature is
# in the file gpg_keys
#
OpenGPGCheck = no
# Blacklisted packages
#
BlackList = nspluginwrapper, valgrind, strace, mono-core
# Process crashes in executables which do not belong to any package?
#
P