4
我試圖在32位英特爾筆記本電腦上的遠程英特爾64位機器上進行調試(一個簡單的Hello World應用程序沒有測試錯誤)。在32位機器上進行64位進程的遠程調試
我運行
gcc -g -o cexecute cexecute.c
gdbserver localhost:2345 cexecute
在遠程機器上
。
後,我的筆記本電腦的本地端口2345
轉發到相同的遠程端口,運行gdb
並鍵入
target remote localhost:2345
我得到:
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 "i686-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) target remote localhost:2345
Remote debugging using localhost:2345
warning: A handler for the OS ABI "GNU/Linux" is not built into this configuration
of GDB. Attempting to continue with the default i386:x86-64 settings.
warning: Architecture rejected target-supplied description
Remote register badly formatted: T0506:0000000000000000;07:e0dbffffff7f0000;10:c0b6ddf7ff7f0000;thread:p64bc.64bc;core:6;
here: 00000000;07:e0dbffffff7f0000;10:c0b6ddf7ff7f0000;thread:p64bc.64bc;core:6;
我很困惑,因爲我有這個工作之前。存在用於該建議執行set architecture
反向問題(從64位計算機的32位應用程序)類似的問題: Remote debug error with GDB
我試圖與各種參數和沒有成功。另外目標平臺類型i386:x86-64
似乎是正確的。兩臺機器都運行ubuntu linux。由於我上次成功運行gdb,我在兩臺機器上安裝了版本更新。缺陷在哪裏?
gdbserver是什麼版本? –
如果你確實找到答案,請發帖,因爲我確定這對他人有幫助。我的回答顯然不夠具體。 –
如果你仍然有你的修改'--target = x86_64 - * - linux'發佈它,我會接受:) – highsciguy