使用 Eclipse CDT gdbserver 进行远程调试:stdin/stdout

发布于 2024-12-31 22:41:21 字数 518 浏览 8 评论 0原文

好吧,这看起来很基本,但运气不好。我正在使用带有 CDT 的 Eclipse Helios。既是主持人又是目标是linux盒子。我一直在目标机器上启动我的应用程序:

gdbserver:端口my_app

并使用“C/C++ Attach to Application”调试配置成功从 eclipse 附加。我的应用程序的标准输出显示在目标系统上,但标准输入不会进入我的应用程序。在 Eclipse 中,我有一个用于 gdb (命令)和 gdb 跟踪的控制台,但没有像本地调试时那样的应用程序控制台。调试配置“分配控制台”复选框仅控制是否获得 gdb 命令控制台。

我尝试单独启动应用程序并附加(使用 gdbserver --multi)。这更糟糕: eclipse/gdb 没有看到目标 tty 上所有正在运行的线程和标准输入导致

子进程以信号 = 0x5 (SIGTRAP) 终止

跟踪/断点陷阱

如有任何帮助,我们将不胜感激。

OK, this seems pretty basic, but no luck. I'm using Eclipse Helios w/ CDT. Both host & target are linux boxes. I've been starting my application on the target machine with:

gdbserver :port my_app

and successfully attaching from eclipse using a "C/C++ Attach to Application" debug configuration. My application's stdout is displayed on the target system, but stdin doesn't go to my app. In eclipse, I have a console for gdb (commands) and gdb trace, but no application console like when debugging locally. The debug configuration "Allocate Console" check-box just controls whether or not I get a gdb command console.

I tried starting the application separately and attaching (using gdbserver --multi). This was worse: eclipse/gdb didn't see all running threads and stdin on the target tty resulted in

Child terminated with signal = 0x5 (SIGTRAP)

Trace/breakpoint trap

Any help would be appreciated.

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

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

发布评论

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

评论(1

忆依然 2025-01-07 22:41:21
  1. 应用程序 std in/out 将转到您用来启动 gdbserver(和应用程序)的终端。 Eclipse 无法重定向它们。
  1. Application std in/out will go to the terminal you used to start the gdbserver (and application) from. Eclipse cannot redirect those.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文