使用Eclipse GUI远程调试C ++应用程序 [英] Remote debugging C++ application with Eclipse GUI

查看:65
本文介绍了使用Eclipse GUI远程调试C ++应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照此链接中的步骤进行操作我设法从命令提示符下的Windows计算机调试驻留在linux主机中的二进制文件.

I followed the steps in this link and I manage to debug a binary which resides in linux host from my windows machine from command prompt.

我在Linux中有gdbserver,并在Windows中的mingw的帮助下安装了gdb.正如我告诉我的那样,我可以提示"target remote x.x.x.x:10000 test"在Windows中命令并调试我的测试应用程序.

I have gdbserver in linux and I installed gdb with the help of mingw in windows. As I told I can prompt "target remote x.x.x.x:10000 test" to command in windows and debug my test application.

我的问题是我无法使用Eclipse gui做同样的事情,在我看来,它具有按钮,选项的色调,但它们对我来说毫无意义.

My problem is I can't do the same with eclipse gui, it seems to me it has tones of buttons, options but they make no sense to me.

我正在选择debug_configurations-> C/C ++远程应用程序(允许我输入linux机器ip/port的唯一应用程序),在主要"选项卡的连接中,我正在输入linux ip.在调试器"选项卡下的同一菜单中,我输入窗口的gdb路径和gdbserver端口.

I am choosing debug_configurations-->C/C++ Remote Application(the only one which allows me to input linux machine ip/port), in "Main" tab to connection I am inputting my linux ip. In same menu under Debugger tab I am inputting my window's gdb path and gdbserver port.

完成所有这些操作后,我相信我为eclipse提供了足够的信息来连接gdb服务器,但是对于eclipse来说却永远不够.我正在通过使用--debug启动gdbserver来检查gdbserver日志,因此gdbserver永远不会被触发,它不会写一行日志.Eclipse甚至不启动连接.但是,它却给我一个错误,例如文件上传期间发生错误".这对我来说毫无意义.

After doing all those I believe I gave enough info to eclipse for connect gdb server but it never enough for eclipse. I am checking gdbserver logs by starting gdbserver with --debug, gdbserver never gets triggered, it does not writes a single line of log. Eclipse even does not starts a connection. But instead it gives me a error like "Error during file upload." which makes no sense to me.

我正在使用"Eclipse版本:Juno Service Release 2".任何帮助将不胜感激 .

I am using "Eclipse Version: Juno Service Release 2" . Any help will be appreciated .

推荐答案

我相信"C/C ++远程应用程序"选项使用Eclipse的 RSE (远程系统资源管理器),用于连接,上载,执行和调试应用程序本身.

I believe that the "C/C++ Remote Application" option uses Eclipse's RDT (Remote Development Tools) and RSE (Remote System Explorer) to connect, upload, execute, and debug the application itself. It

如果您只想连接到 gdbserver ,然后创建"C/C ++附加到应用程序"调试配置,然后在调试器"选项卡下,将调试器设置为gdbserver.

If all you want to do is connect to a gdbserver, then create a "C/C++ Attach to Application" debug configuration, and under the Debugger tab, set Debugger to gdbserver.

这篇关于使用Eclipse GUI远程调试C ++应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆