【问题标题】:gdb core dump "is not a core dump: File format not recognized"gdb 核心转储“不是核心转储:文件格式无法识别”
【发布时间】:2019-09-22 11:41:09
【问题描述】:

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

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

我尝试分析它gdb test core 并收到此错误消息

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

【问题讨论】:

  • 你对核心尺寸有限制吗? (检查ulimit -c)
  • 是的,我已经改过了,之前文件根本没有出现
  • @94230 核心文件的大小是否与您设置的限制相同?如果是这样,您会发现不完整的核心文件实际上是无用的。保证有用核心文件的唯一核心文件限制设置是unlimited。
  • @AndrewHenle 不,文件是空白的,不是一个字节
  • @94230 你在用虚拟盒子吗?当前目录的底层文件系统是什么?

标签: c gdb


【解决方案1】:

我正在使用 VirtualMachine 并执行 macOS 目录中的文件,在 VM 桌面中执行此操作时效果很好

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-05-12
    • 2013-02-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多