gdb不会从外部体系结构读取核心文件

gdb不会从外部体系结构读取核心文件,gdb,arm,core-file,Gdb,Arm,Core File,我试图在Linux桌面上读取ARM核心文件,但它似乎无法识别我的核心文件。我有没有办法告诉gdb我的核心文件是什么类型的 $ file ~/daemon ./daemon: ELF 32-bit LSB executable, ARM, version 1, dynamically linked (uses shared libs), for GNU/Linux 2.0.0, not stripped $ file ~/core ./core: ELF 32-bit LSB core file

我试图在Linux桌面上读取ARM核心文件,但它似乎无法识别我的核心文件。我有没有办法告诉gdb我的核心文件是什么类型的

$ file ~/daemon
./daemon: ELF 32-bit LSB executable, ARM, version 1, dynamically linked (uses shared libs), for GNU/Linux 2.0.0, not stripped
$ file ~/core
./core: ELF 32-bit LSB core file ARM, version 1 (SYSV), SVR4-style, from './daemon -v -v -v -v -e 10 -t foo'
$ gdb-multiarch ~/daemon ~/core
GNU gdb (GDB) 7.5-ubuntu
Copyright (C) 2012 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".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from ./daemon...done.
"./core" is not a core dump: File format is ambiguous
(gdb) core-file ~/core 
"./core" is not a core dump: File format is ambiguous
生成平台是armv4,根据set架构列表,gdb multiarch声称支持armv4

编辑:为了澄清,我运行gdb的桌面计算机是x86_64-linux-gnu,即一个64位Intel Ubuntu box。

仅当您尝试运行gdb multiarch的桌面是x86时,以下内容才相关

Gdb是一个调试器。因此,它将无法调试x86桌面计算机上的外部体系结构可执行文件,因为您无法在x86处理器上运行arm代码。不过,您可以使用将在arm机器上运行的gdb服务器远程调试它

您的台式机是arm还是x86?

这可能会有帮助:

$ gdb-multiarch
...
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) set gnutarget elf32-littlearm
(gdb) file daemon
...
(gdb) target core core
...
(gdb)

我可能会感到困惑,但我认为gdb能够读取核心转储,即使它是frmo的外核架构?我不想执行它。我只想看看回溯、寄存器等等。据我所知,gdb是一个动态分析工具,因此需要将二进制文件加载到可执行内存中。我知道这不是你想要的,但是也许你想要的是像objdump或ida?user1629505是正确的。你们可以发布一个答案,这样我就可以标记它了吗?gdb声明读取守护进程是可以的,但问题是核心文件。在核心文件上尝试readelf以查看任何可疑内容。对于此类任务,文件实用程序必须非常肤浅。