如何在没有gdbserver的情况下使用Eclipse CDT进行远程调试?
我们在 Windows 上使用 Eclipse CDT 5 C++ IDE 在远程 AIX 主机上开发 C++ 应用程序。
Eclipse CDT 能够使用 gdbserver 执行远程调试。 不幸的是,AIX 上不支持 gdbserver。
有人熟悉在没有 gdbserver 的情况下使用 Eclipse CDT 远程调试的方法吗? 也许使用 SSH shell 连接到 gdb?
We're using the Eclipse CDT 5 C++ IDE on Windows to develop a C++ application on a remote AIX host.
Eclipse CDT has the ability to perform remote debugging using gdbserver. Unfortunately, gdbserver is not supported on AIX.
Is anyone familiar with a way to debug remotely using Eclipse CDT without gdbserver? Perhaps using an SSH shell connection to gdb?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
还尝试使用 windows eclipse-cdt-gdb 远程调试 aix-appl。
最后因 unix/windows 路径问题而受阻。 也许我的结果可以进一步帮助你 - 也许你已经成功了。 我对你的评论很感兴趣。 在 eclipse 新闻门户上询问 - 按照 martin oberhuber 的回答(再次感谢)尝试了 dsp dd (也因路径问题而受阻)并在 eclipse bugzilla 中设置请求。
这里是新闻链接:
http://www.eclipse.org/ newsportal/article.php?id=406&group=eclipse.dsdp.tm
这是我的 bugzilla:
https://bugs.eclipse.org/bugs/show_bug.cgi?id= 252758
目前我们仍然使用 xldb 进行本地调试,但我现在正在尝试 ddd-gdb。 至少本地 gdb 正在运行。
tried also to remotly debug an aix-appl with windows eclipse-cdt-gdb.
Got blocked at the end with unix/windows path-problems. Maybe my result can help u a little further - maybe you already got it work. I'm interested in your comment. asked on eclipse news portal- following the answer of martin oberhuber (thanks again) tried dsp dd (also blocked with path problem) and set an request in eclipse bugzilla.
here the link to news:
http://www.eclipse.org/newsportal/article.php?id=406&group=eclipse.dsdp.tm
Here my bugzilla:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=252758
At the moment we still debug localy with xldb but I am trying ddd-gdb at the moment. At least locally gdb is running.
无论如何,我终于可以远程运行 gdb 了。 在任务栏上的 Bug 符号处,我选择了“调试配置 - GDB 硬件调试”。
在主要 C/C++ 应用程序中,我设置了可执行文件的 Samba 共享的完整路径 (
X:\abin\vlmi9506
)。 我还在项目中的X:\abin
上设置了一个链接文件夹。 然后我在 GDB 设置中修改了我的批处理脚本。 它不是直接在 plink-session 中调用 gdb,而是调用一个 unix-shell-script,它会打开 gdb。 这样我就可以在调试之前为程序设置一些unix环境变量。 我的批处理中的调用:在 unix 脚本中,我使用 eclipse 中的命令行参数启动了 gdb,这是我在以前的尝试中找到的。 shell 命令中的调用如下所示:
然后 IBM 只是为 AIX 提供 gdb 6.0。 我在网上找到了版本 6.8 http://www.perzl.org /aix/index.php?n=Main.Gdb。 我们的管理员安装了它。
我现在可以单步执行程序并观察变量。 我什至可以直接在控制台视图中编写 gdb 命令。 yabadabadooooooo
希望对其他人也有帮助。 无法说出,什么才是真正的胜利者行动。
但每个答案都会带来更多新问题。 现在我得到了其中的 3 个。
finally I got gdb run remotly anyhow now. At the Bug-symbol on the taskbar I took Debug Configurations - GDB Hardware Debugging.
In Main C/C++ Applications I set the full path on the Samba share of the executable (
X:\abin\vlmi9506
). I also set a linked folder onX:\abin
in the project. Then I modified my batch-script in GDB Setup. It's not directly calling gdb in the plink-session but a unix-shell-script, which opens gdb. By this I have the possibility to set some unix environment-variables for the program before doing debug. The call in my batch:In the unix script I started gdb with the command line params from eclipse, that I found in my former tryals. The call in the shell command looks like this:
Then IBM just gives gdb 6.0 for AIX. I found version 6.8 in the net at http://www.perzl.org/aix/index.php?n=Main.Gdb. Our Admin installed it.
I can now step through the program and watch variables. I even can write gdb-commands directly in the console-view. yabadabadooooooo
Hope that helps to others as well. Can not tell, what was really the winner-action.
But each answer gives more new questions. Now I got 3 of them.
我通常不会在黑暗中对一个我无法真正测试答案的问题进行尝试,但由于这个问题已经存在了一天,我会尝试一下。 看起来似乎是:
http://wiki.eclipse.org/TM_and_RSE_FAQ#How_can_I_do_Remote_Debugging_with_CDT.3F< /a>
...即使自 wiki 页面创建以来 CDT 已更改,您仍然应该能够将调试命令更改为:
ssh remotehost gdb
而不是使用使用 gdbserver 的 TM。 这可能会比 TM 远程调试稍微慢一些,因为它实际上使用本地 gdb,但另一方面,这样您就不必通过 NFS 或 SMB 挂载源代码来使其可用于本地调试器(并且如果你在局域网上,无论如何,这可能并不重要)。
还有一个针对 Linux 的参考 TCF 实现,您可能会或可能不会为 AIX 重新编译它,但它允许在 gdbserver 不可用时进行远程调试:
http://wiki.eclipse.org/DSDP/TM/TCF_FAQ
I wouldn't normally take a shot in the dark on a question I can't really test the answer to, but since this one has sat around for a day, I'll give it a shot. It seems from looking at:
http://wiki.eclipse.org/TM_and_RSE_FAQ#How_can_I_do_Remote_Debugging_with_CDT.3F
...that even if the CDT has changed since that wiki page was made, you should still be able to change the debug command to:
ssh remotehost gdb
instead of using TM which uses gdbserver. This will probably be slightly slower than the TM remote debugging since that actually uses a local gdb, but on the other hand this way you won't have to NFS or SMB mount your source code to make it available to the local debugger (and if you're on a LAN it probably won't matter anyhow).
There's also a reference TCF implementation for linux, which you may or may not have any luck recompiling for AIX, but it allows for remote debugging if gdbserver is otherwise not available:
http://wiki.eclipse.org/DSDP/TM/TCF_FAQ