首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >gdb不会从外部架构读取核心文件

gdb不会从外部架构读取核心文件
EN

Stack Overflow用户
提问于 2012-09-27 20:34:47
回答 2查看 9.3K关注 0票数 8

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

代码语言:javascript
复制
$ 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

根据“集合架构”列表,生成平台是gdb-multiarch声称支持的armv4。

编辑:为了澄清,我的运行gdb的台式机是"x86_64-linux-gnu",即64位Intel Ubuntu机器。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2013-02-08 21:01:20

这可能会有所帮助:

代码语言:javascript
复制
$ 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)
票数 19
EN

Stack Overflow用户

发布于 2012-09-27 22:42:55

只有当您的桌面(您试图在其中运行gdb-multiarch)是x86时,以下内容才有意义。

Gdb是一个调试器。因此,它将无法在您的x86台式机上调试外来体系结构可执行文件,因为您不能在x86处理器上运行arm代码。但是,您可以使用将在arm机器上运行的gdb-server对其进行远程调试。

您的桌面是arm还是x86?

票数 -4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12621511

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档