2016-09-25 421 views
1

我使用這個(http://cs.baylor.edu/~donahoo/tools/gdb/tutorial.html)指南來了解GDB的工作原理。 編譯和代碼上傳到我的嵌入式linux ARM平臺後,我用一個遠程連接與我的目標gdbserver的連接:GDB遠程調試失敗,錯誤E01

目標:

[email protected]:/Software# gdbserver HOST:1234 broken 
Process broken created; pid = 1103 
Listening on port 1234 
Remote debugging from host 192.168.178.32 

主機(Ubuntu的14.04虛擬機上運行) :

Remote debugging using 192.168.178.33:1234 
warning: A handler for the OS ABI "GNU/Linux" is not built into this 
configuration of GDB. Attempting to continue with the default arm settings. 

Cannot access memory at address 0x0 
0x43330d40 in ??() 
(gdb) 

我設置的斷點到線43,繼續運行程序,直到它停止在斷點處:

(gdb) b 43 
Breakpoint 1 at 0x8b68: file broken.cpp, line 43. 
(gdb) continue 
Continuing. 

Breakpoint 1, main() at broken.cpp:43 
43 double seriesValue = ComputeSeriesValue(x, n); 
(gdb) 

但我的主機上一步調用我得到這個錯誤後: 主持人:

warning: Remote failure reply: E01 
Ignoring packet error, continuing... 

目標:

ptrace: Input/output error. 
input_interrupt, count = 1 c = 36 ('$') 

是什麼意思,我該如何解決?

感謝您的幫助。

回答

0

Host (Ubuntu 14.04 running in a virtual machine):

Remote debugging using 192.168.178.33:1234 
warning: A handler for the OS ABI "GNU/Linux" is not built into this 
configuration of GDB. Attempting to continue with the default arm settings.` 

這就是說你的(主機)GDB沒有被構建成支持你想要調試的目標。

What does it mean and how can I fix it?

您需要可以得到一個不同的版本(主機)GDB的,或者自己建立一個具有正確--target設置。

通常一個正確的主機GDB包含在您用來爲目標構建的cross-gcc中。所以修復可能像運行/path/to/cross-gdb而不是gdb一樣簡單。

+0

謝謝。這是科倫特的暗示。似乎arm-none-eabi-gdb不適用於我的當前編譯器。 通過使用 bitbake gdb-cross 你可以爲你的交叉編譯器創建一個可用的gdb版本。 – Kampi

相關問題