我有一个由erlang应用程序生成并希望分析的核心转储文件。这是我第一次使用gdb。我安装了gdb,但运行可执行文件和核心转储文件没有运气。
我将gdb的可执行文件和核心转储作为
gdb erts-5.9.3/bin/beam.smp core
当我跑步时,我明白了,
GNU gdb (GDB) 7.9
Copyright (C) 2015 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-apple-darwin15.4.0".
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 erts-5.9.3/bin/beam.smp...(no debugging symbols found)...done.
"/Users/sad/projects/core" is not a core dump: File format not recognized
有任何帮助吗?谢谢!
答案 0 :(得分:1)
This GDB was configured as "x86_64-apple-darwin15.4.0".
"/Users/sad/projects/core" is not a core dump: File format not recognized
$ file core
/Users/sad/projects/core: ELF 64-bit LSB core file x86-64, version 1 (SYSV), ...
Mac OS不使用ELF
文件格式。我们可以放心地假设这个core
来自其他系统,而不是你想要分析它的系统。
仍然可以在Mac OS系统上分析core
,但您需要:
一般情况下,在发生崩溃的主机上进行事后分析更容易 。