簡體   English   中英

gdb不會從國外架構讀取核心文件

[英]gdb won't read core file from foreign architecture

我正在嘗試在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,gdb-multiarch聲稱支持該平台。

編輯:澄清一下,我運行gdb的台式機是“ x86_64-linux-gnu”,即一個64位Intel Ubuntu盒。

這可能會有所幫助:

$ 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-multiarch)為x86時,以下內容才有意義。

Gdb是調試器。 因此,它將無法在x86台式機上調試外部體系結構可執行文件,因為您無法在x86處理器上運行arm代碼。 但是,您可以使用gdb-server對其進行遠程調試,該服務器將在arm計算機上運行。

是台式機臂還是x86?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM