如何使用gdbserver设置Eclipse进行远程C调试?

编程入门 行业动态 更新时间:2024-10-08 05:24:33
本文介绍了如何使用gdbserver设置Eclipse进行远程C调试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我对Eclipse很陌生。

I am pretty new to Eclipse. Trying to set up to do remote debugging.

在这种情况下,我正在连接到运行Linux的远程计算机,而我正在运行Windows。

Here is situation, I am connecting to remote machine running Linux, I am running Windows.

1)我已经为Eclipse安装了所有必需的工具,并且能够连接到Linux计算机。

1) I have installed all the necessary tool for Eclipse, and was able to connect to Linux machine.

2)远程计算机的 gdbserver

linux1[1]% gdbserver Usage: gdbserver [OPTIONS] COMM PROG [ARGS ...] gdbserver [OPTIONS] --attach COMM PID gdbserver [OPTIONS] --multi COMM COMM may either be a tty device (for serial debugging), or HOST:PORT to listen for a TCP connection. Options: --debug Enable debugging output.

我是否需要在 gdbserver 中进行任何配置

Do I need to configure anything in gdbserver ???

3)我还应该在Eclipse中配置什么?用于远程调试?

3) What else should I configure in Eclipse ? for remote debugging ?

4)我的GDB版本与远程计算机GDB不同是否重要?

4) Does it matter that my GDB version is different from remote Machine GDB ?

推荐答案

gdbserver 需要更多参数。例如,说 gdbserver localhost:1337 yourprogram yourprogramarguments 并使它保持运行。

gdbserver needs more arguments. For example, say gdbserver localhost:1337 yourprogram yourprogramarguments and keep it running.

然后在Eclipse中创建一个 C / C ++应用程序的新调试配置。在主选项卡的底部,选择 GDB(GSF)远程系统进程启动器作为启动器。在调试器选项卡上,选择 gdbserver调试器作为调试器。在连接下,说 TCP 作为连接类型,并给 localhost:1337 作为地址。启动配置时,可以通过在控制台中输入命令来控制远程 gdb 。

Then, in Eclipse, create a new debug configuration for a "C/C++ Application". On the main tab, on the bottom, choose GDB (GSF) Remote System Process Launcher as launcher. On the debugger tab, choose gdbserver Debugger as the debugger. Under connection, say TCP as connection type and give localhost:1337 as address. When you launch the configuration, you may control the remote gdb by entering commands into the console.

更多推荐

如何使用gdbserver设置Eclipse进行远程C调试?

本文发布于:2023-11-24 14:16:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1625551.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何使用   gdbserver   Eclipse

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!