使用Eclipse CDT和GDB进行调试 [英] Debugging with Eclipse CDT and GDB

查看:244
本文介绍了使用Eclipse CDT和GDB进行调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有使用共享库的Eclipse CDT C ++应用程序项目。这个库是用调试信息编译的,其源代码在正确的路径下可用。



现在我尝试使用Eclipse和GDB调试我的应用程序。如果我在我的应用程序源代码中设置断点,一切都很好。
然后我打开包含的共享库的源文件,并将断点放在那里。当启动调试会话时,我被警告: 加载符号中没有名为xxx.cpp的源文件 ,此时执行不会被停止。如果在调试会话已经运行的时候我把相同的断点放在同一个文件中,一切都可以正常运行。有什么问题?



感谢您的帮助。

解决方案

有这个同样的问题,尝试在Qt插件(它们是基于Windows DLL的)设置断点。



我发现这个讨论,解决方案对我来说完美,我使用的Eclipse的新版本比你听起来像是同样的问题。



http://www.eclipse.org/forums/index.php?t=msg&goto=555294&S = 2aed4155e654e34cb2e84a6fb23de9bf#msg_555294



基本上,它是使用支持延迟断点的较旧gdb协议。使用标准创建进程启动器而不是调试配置中的GDB(DSF)创建进程启动程序,并且我将立即设置所有DLL断点。



版本:Helios发布
构建ID:20100617-1415



CDT和GDB版本7.0.0。



好运气!


I have Eclipse CDT C++ application project that uses shared library. This library is compiled with debug info and its source is available at the right path.

Now I try to debug my application with Eclipse and GDB. If I put breakpoints in my application source code, everything is fine. Then I open a source file of the included shared lib and put the breakpoint there. When launching the debug session I am warned that "No source file named xxx.cpp in loaded symbols" and execution isn't stoped at that point. If I put the same breakpoint in the same file when debugging session is already running, everything works fine. What is wrong?

Thanks for your help.

解决方案

I had this same problem, trying set breakpoints in Qt plugins (which are based on Windows DLL,s).

I found this discussion and the solution worked perfectly for me, though I am using a newer version of Eclipse than you were it sounds like much the same problem.

http://www.eclipse.org/forums/index.php?t=msg&goto=555294&S=2aed4155e654e34cb2e84a6fb23de9bf#msg_555294

Basically, it is to use an older gdb protocol that supports deferred breakpoints. Using the "Standard Create Process Launcher" instead of "GDB (DSF) Create Process Launcher" from Debug Configurations and I get all my DLL breakpoints set now.

Version: Helios Release Build id: 20100617-1415

CDT and GDB version 7.0.0.

Good luck!

这篇关于使用Eclipse CDT和GDB进行调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆