我遇到了一种情况,我们只有核心文件(没有可执行文件)。
如何使用gdb或任何其他工具来收集尽可能多的信息。

gdb core
GNU gdb (GDB) SUSE (7.1-8.9.1)
Copyright (C) 2010 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-suse-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
"/home/core": not in executable format: File format not recognized

最佳答案

我遇到了一种情况,我们只有核心文件(没有可执行文件)。
你肯定在什么地方有可执行文件?如果可以的话,拿一份。
如何使用gdb或任何其他工具来收集尽可能多的信息。
除非您将主机配置为转储文件支持的共享映射(请参见coredump_filterdocumentation),否则您无法从核心提取很多有意义的信息。
gdb core
别那么做。请改为:gdb -c core。那么whereinfo registers和可能的print $_siginfo可能会提供一些东西,但不会太多。

07-28 03:02
查看更多