linux – 在32位机器上远程调试64位进程

linux – 在32位机器上远程调试64位进程,第1张

概述我试图在我的32位英特尔笔记本电脑的远程英特尔64位机器上调试(一个简单的Hello World应用程序,没有测试错误). 我跑 gcc -g -o cexecute cexecute.cgdbserver localhost:2345 cexecute 在远程机器上. 将笔记本本地端口2345转发到同一远程端口后,运行gdb并键入 target remote localhost:2345 我明 我试图在我的32位英特尔笔记本电脑的远程英特尔64位机器上调试(一个简单的Hello World应用程序,没有测试错误).

我跑

gcc -g -o cexecute cexecute.cgdbserver localhost:2345 cexecute

在远程机器上.

将笔记本本地端口2345转发到同一远程端口后,运行gdb并键入

target remote localhost:2345

我明白了:

GNU gdb (GDB) 7.5-ubuntucopyright (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:2345Remote deBUGging using localhost:2345warning: A handler for the OS ABI "GNU/linux" is not built into this configurationof GDB.  Attempting to continue with the default i386:x86-64 settings.warning: Architecture rejected target-supplIEd descriptionRemote 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位应用程序),有类似的问题建议执行集体系结构:
Remote debug error with GDB

我尝试了各种各样的论点并没有成功.目标平台类型i386:x86-64似乎也是正确的.两台机器都运行ubuntu linux.自从我上次在两台机器上安装版本更新后成功运行gdb.缺陷在哪里?

解决方法

Since I ran gdb successfully last time I installed version updates on both machines. Where is the flaw?

缺陷必须与您的记忆:一个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

应该管用.

总结

以上是内存溢出为你收集整理的linux – 在32位机器上远程调试64位进程全部内容,希望文章能够帮你解决linux – 在32位机器上远程调试64位进程所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/1017838.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-23
下一篇 2022-05-23

发表评论

登录后才能评论

评论列表(0条)

保存