使用Eclipse通过gdbserver进行远程调试

发布于 2024-09-07 19:02:17 字数 327 浏览 3 评论 0原文

有谁知道为什么当我使用目标远程命令在命令行上使用 gdb 管理设备时无法使用 Eclipse CDT 远程调试设备?连接时我确实收到警告,但除此之外它似乎工作正常。

使用 Eclipse,我应该有正确的设置,gdbserver 会在远程计算机上通知我已建立连接,但之后 Eclipse 会给出错误:“启动调试”遇到问题。请求失败:目标未响应(超时)。远程设备还显示“杀死劣等”(我在 gdb 中没有得到)。错误日志也没有显示任何其他内容。

我在这两种情况下都使用相同的进程、二进制和 gdb 可执行文件,并连接到相同的设备和设备。港口。我使用的是 gdb 7.1,主机是 64 位 Ubuntu Lucid。

Does anyone know why I can't use Eclipse CDT to remotely debug a device when I manage it on the command-line with gdb using target remote command? I do get a warning when connecting, but other than that it seems to work fine.

With Eclipse I should have the correct settings and gdbserver informs me on the remote machine that a connection was establised but after that Eclipse gives an error: 'Launching Debug' has encountered a problem. The request failed: Target is not responding (timed out). Remote device also says "Killing inferior" (which I don't get with gdb). The error log shows nothing else either.

I am using the same process, binary and gdb executable in both cases and connecting to the same device & port. I'm using gdb 7.1 and the host is 64-bit Ubuntu Lucid.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

策马西风 2024-09-14 19:02:17

我遇到了同样的问题,发现 iptables 产生了问题。

您是否尝试过停止或禁用防火墙?如果是 iptables,您必须执行以下操作:

/etc/init.d/iptables stop

另一方面,在启动应用程序后(在连接调试器之前),您是否通过 netstat 检查了调试端口的可用性?

#On linux
netstat -nap

#On windows
netstat -nab

希望能有所帮助。

I had same issue and found that iptables was generating issues.

Have you tried stopping or disabling your firewall? In case of iptables you have to do:

/etc/init.d/iptables stop

On the other hand, after you start your application (before connecting your debugger) have you checked the debug port availability through netstat?

#On linux
netstat -nap

#On windows
netstat -nab

Hope to help.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文