linux – 在32位机器上远程调试64位进程
发布时间:2020-12-13 22:54:02 所属栏目:Linux 来源:网络整理
导读:我试图在我的32位英特尔笔记本电脑的远程英特尔64位机器上调试(一个简单的Hello World应用程序,没有测试错误). 我跑 gcc -g -o cexecute cexecute.cgdbserver localhost:2345 cexecute 在远程机器上. 将笔记本本地端口2345转发到同一远程端口后,运行gdb并键
我试图在我的32位英特尔笔记本电脑的远程英特尔64位机器上调试(一个简单的Hello World应用程序,没有测试错误).
我跑 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; 我很困惑,因为我之前有这个工作.对于反向问题(来自64位机器的32位应用程序),有类似的问题建议执行集体系结构: 我尝试了各种各样的论点并没有成功.目标平台类型i386:x86-64似乎也是正确的.两台机器都运行ubuntu linux.自从我上次在两台机器上安装版本更新后成功运行gdb.缺陷在哪里? 解决方法
缺陷必须与您的记忆:一个i * 86-linux- *版本的GDB无法调试x86-64进程,您必须构建gdb作为交叉调试器(如Mats Petersson已经建议的那样),或者获得预先从某个地方建造一个. 就像是: ./configure --target=x86_64-linux-gnu --host=i686-linux-gnu --build=i686-linux-gnu CC=gcc AR=ar RANLIB=ranlib 应该管用. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |