首页 > 编程知识 正文

ubuntu非法指令核心已转储,c++转换到coff期间失败

时间:2023-05-03 23:49:08 阅读:39482 作者:1425

尝试了很多方法都没有生成核心文件。 我在使用ubuntu系统

制作两个后,在当前目录下生成core文件,可以使用gdb调试

1、修改ulimit -c filesize、core文件的大小,首先可以在ulimit -a中看到与core file size对应的值

2、修改/proc/sys/kernel/core_pattern内容: ehco core/proc/sys/kernel/core _ pattern

(ehco“核心- % e-% p-% t”/proc/sys/kernel/core _ pattern )

以下是参数列表:

添加%p-insertPIDintofilenamePID

% u-insertcurrentuidintofilename将添加当前uid

% g-insertcurrentgidintofilename添加当前GID

% s-insertsignalthatcausedthecoredumpintothefilename添加导致核心的信号

% t-insertunixtimethatthecoredumpoccurredintofilename生成附加核心文件时的UNIX时间

添加% h-inserthostnamewherethecoredumphappenedintofilename主机名

添加% e-insertcoredumpingexecutablenameintofilename命令名称

运行可执行程序时,核心文件将显示在当前目录下

使用gdb ./可执行文件名称./core

可以调试

文章: http://blog.csdn.net/Shao vey/article/details/2744487

阅读(1860 ) |评论(0) |转发)0|

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。