coredump功能打开和使用

1、内核配置
在linux kernel中打开ELF_CORE开关,重新编译烧写内核。
->[Config Kernel settings]
-> [General setup]
-> [Configure standard kernel features(except users)]
-> [Enable ELF core dumps]

2、或者修改linux-3.10/.confg中配置项CONFIG_ELF_CORE=y。

3、ulimit -c unlimited设置coredump文件大小为unlimited,或者程序中加入setrlimit函数(效果等于ulimit -c unlimited)

4、使用coredump功能
coredump使用配置

5、问题
5.1、无法转存到外接设备上,比方说SD卡,在第四步中设置转存路径
解决:
在coredump源码中,取消外接设备的保存权限:
fs\coredump.c void do_coredump(const siginfo_t *siginfo)
在这里插入图片描述

你可能感兴趣的:(安装环境,linux)