我已经将 Eclipse 设置得相当好,可以通过 Cygwin 运行 G++ 编译器。偶the character encoding is set up correctly !
我的配置似乎仍然有问题:我无法调试。调试 View 中的暂停按钮被简单地禁用,并且我的应用程序树中没有出现任何线程。看来 gdb
根本没有与 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 中的样子(左侧调试,右侧运行):
最佳答案
当 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 aSIGINT
to the cygwingdb
.
So, if anybody is able to debug with eclipse andgdb
, 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/