当我们只有核心文件时如何收集信息/调试

问题描述 投票:0回答:1

我遇到过一种情况,我们只有核心文件(没有可执行文件)。 我如何将核心文件与 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
linux gdb coredump
1个回答
1
投票

我遇到过一种情况,我们只有核心文件(没有可执行文件)。

您肯定在某处有可执行文件吗?如果可以的话,获取一份副本。

我如何将核心文件与 gdb 或任何其他工具一起使用来收集尽可能多的信息。

除非您将主机配置为转储文件支持的共享映射(请参阅

coredump_filter
文档),否则您根本无法从核心中提取太多有意义的信息。

gdb core

不要这样做。这样做:

gdb -c core
。那么
where
info registers
以及可能的
print $_siginfo
可能会提供一些东西,但不会太多。

© www.soinside.com 2019 - 2024. All rights reserved.