当前位置:  开发笔记 > 后端 > 正文

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

如何解决《gdb不会从外部架构中读取核心文件》经验,为你挑选了1个好方法。

我正在尝试在我的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 
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:
...
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

根据"set架构"列表,生成平台是armv4,gdb-multiarch声称支持它.

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



1> yanychar..:

这可能有所帮助:

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

推荐阅读
保佑欣疼你的芯疼
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有