C “gdb堆芯转储”;不是核心转储:文件格式不可识别;

C “gdb堆芯转储”;不是核心转储:文件格式不可识别;,c,gdb,C,Gdb,我用标志编译了我的C文件test,-g-Wall-std=gnu99-pedantic 我运行了它,创建了一个core文件 我试着分析它gdb测试核心,我得到了这个错误消息 GNU gdb (Debian 7.12-6) 7.12.0.20161007-git Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/license

我用标志编译了我的C文件
test
-g-Wall-std=gnu99-pedantic

我运行了它,创建了一个
core
文件

我试着分析它
gdb测试核心
,我得到了这个错误消息

GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from test...done.
"/[...]/aula02/core" is not a core dump: File format not recognized
GNU gdb(Debian 7.12-6)7.12.0.20161007-git
版权所有(C)2016免费软件基金会。
许可证GPLv3+:GNU GPL版本3或更高版本
这是自由软件:您可以自由更改和重新发布它。
在法律允许的范围内,不存在任何担保。键入“显示复制”
和“显示保修”了解详细信息。
此GDB配置为“x86_64-linux-gnu”。
键入“显示配置”以获取配置详细信息。
有关错误报告说明,请参阅:
.
在线查找GDB手册和其他文档资源,网址为:
.
要获得帮助,请键入“帮助”。
键入“apropos word”以搜索与“word”相关的命令。。。
从测试中读取符号…完成。
“/[…]/aula02/core”不是核心转储:无法识别文件格式

我正在使用一台虚拟机并执行macOS目录中的文件,在VM桌面上执行时工作正常

您对内核大小有限制吗?(请检查
ulimit-c
)是的,我已经更改了它,在此之前该文件没有出现在all@94230核心文件的大小是否与您设置的限制相同?如果是这样,您会发现一个不完整的核心文件实际上是无用的。保证有用核心文件的唯一核心文件限制设置是
unlimited
@AndrewHenle否,该文件为空,而不是单个byte@94230您正在使用虚拟盒吗?当前目录的底层文件系统是什么?