gdb 不会从外国架构中读取核心文件 [英] gdb won't read core file from foreign architecture

查看:24
本文介绍了gdb 不会从外国架构中读取核心文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的 Linux 桌面上读取 ARM 核心文件,但似乎无法找出我的核心文件.有什么方法可以指示 gdb 我的核心文件是什么类型的?

I'm trying to read an ARM core file on my Linux desktop, but it seems not to be able to figure out my core file. Is there any way I can instruct gdb what type my core file is?

$ 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,gdb-multiarch声称支持,根据设置架构"列表.

The generating platform is armv4, which gdb-multiarch claim to support, according to the "set architecture" list.

澄清一下,我运行 gdb 的台式机是x86_64-linux-gnu",即 64 位 Intel Ubuntu 机器.

To clarify, my desktop machine running gdb is "x86_64-linux-gnu", namely an 64-bit Intel Ubuntu box.

推荐答案

这可能会有所帮助:

$ 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 不会从外国架构中读取核心文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆