我对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调试?
发布评论