0

我已经为 ARM 平台交叉编译了 /bin/ls NetBSD 实用程序。在执行相同的操作时,我看到该应用程序崩溃了。尝试使用 gdb 解码相同的内容。我看到以下错误。

GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5_5.2) 版权所有 (C) 2009 Free Software Foundation, Inc. 许可证 GPLv3+:GNU GPL 版本 3 或更高版本http://gnu.org/licenses/ gpl.html 这是免费软件:您可以自由更改和重新分发它。在法律允许的范围内,不提供任何保证。键入“显示复制”和“显示保修”以获取详细信息。这个 GDB 被配置为“i386-redhat-linux-gnu”。有关错误报告说明,请参阅: http ://www.gnu.org/software/gdb/bugs/ ...从 /home/subrahmanyam/crash/ls...读取符号...(未找到调试符号)...完毕。

没有核心文件处理程序识别格式,使用默认值 Can't fetch registers from this type core file Can't fetch registers from this type of core file Core是由`sh'生成的。程序以信号 4 终止,非法指令。无法从此类核心文件中获取寄存器 无法从此类核心文件中获取寄存器

disassemble 没有函数包含所选帧的程序计数器。(gdb)

你能帮忙解码核心文件吗?

4

1 回答 1

0

It seems there is a bug in GDB which causes the cross-target version to be unable to properly recognize the format of core file from the intended target host. (Possibly this has something to do with the fact that it is impossible to do set osabi NetBSD ELF.)

Perhaps you can install and use the ARM GDB built for the NetBSD target system.

Note that the default binaries installed on NetBSD will not have debug symbols, so you may have to build and copy the debug data files to the target host as well. You can do this with the following settings in the mk.conf file you use for your cross-build:

MKDEBUG =   yes
MKDEBUGLIB =    yes

The debug files will end up in $DESTDIR/usr/libdata/debug

于 2016-03-03T02:28:09.937 回答