c++ - Eclipse CDT : cannot debug or terminate application

标签 c++ gdb cygwin g++ eclipse-cdt

我已经将 Eclipse 设置得相当好,可以通过 Cygwin 运行 G++ 编译器。偶the character encoding is set up correctly !

我的配置似乎仍然有问题:我无法调试。调试 View 中的暂停按钮被简单地禁用,并且我的应用程序树中没有出现任何线程。看来 gdb 根本没有与 Eclipse 通信。

(imageshack) Debug view in Eclipse

目前,我的调试设置如下:

Debugger: "Cygwin gdb Debugger"

GDB debugger: gdb

GDB command file: .gdbinit

Protocol: Default

我应该在这里提到,我不知道 .gdbinit 是做什么的;在我的项目中它只是一个空文件。

我的配置有什么问题吗?

调试

当尝试在 Debug模式下终止应用程序时,Eclipse 显示以下错误:

Target request failed: failed to interrupt.

我也无法终止该进程;我必须杀死它的父级 gdb.exe,这又会杀死我的应用程序。

正在运行

正常运行时,会调用一堆kill.exe,什么也不做,而Eclipse显示以下错误:

Terminate failed.

我可以从任务管理器中杀死 FaceDetector.exe

进程浏览器

这就是 Process Explorer 中的样子(左侧调试,右侧运行):

(imageshack) Process tree of Eclipse

最佳答案

当 Eclipse 作为普通用户运行时,您是否检查过这是否是将调试器附加到以 root 身份运行的应用程序的实例? (如 this thread )

您是否尝试以管理员身份运行 eclipse,只是为了检查问题是否仍然存在?


另外,这个comments says :

I spend also a whole day to analyze why I was not able to supsend my gdb from eclipse.
Finally I found, that there was no kill.exe found within the path, which is used by eclipse to send a SIGINT to the cygwin gdb.
So, if anybody is able to debug with eclipse and gdb, and is NOT able to suspend a running debug target, check if there is a cygwin kill.exe.

关于c++ - Eclipse CDT : cannot debug or terminate application,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2538083/

相关文章:

c++ - 找到除数的数量不知道出了什么问题

c++ - 为什么异常捕获是基于顺序的而不是基于最接近的继承?

c++ - Opengl + SDL 链接错误

c - Linux 中的 gdb7.7.1。当我尝试运行 gdb 时出现 "no debugging symbols found"

c - -0x4(%rbp) 在 gdb 反汇编中意味着什么?

linux - 命令行 CSV 查看器

c++ - 使用 makefile (c++) 部分编译和包含 boost

c - 在 GDB 中使用 ptype 设置扩展结构的深度

windows - 从命令行对不同长度的十六进制数进行排序?

java - 在用于 Java 代码的 Perl 脚本中指定堆大小