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

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

问题描述

我有使用共享库的Eclipse CDT C ++应用程序项目。该库编译调试信息及其来源可在正确的道路。

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.

现在我尝试调试我与Eclipse和GDB的应用程序。如果我在我的应用程序源代码中设置断点,一切都很好。
然后我打开一个包含共享库的源文件,并将断点放在那里。当启动调试会话我警告说, 中加载符号没有命名xxx.cpp源文件并执行不会在该点采空。如果我把同样的断点在同一个文件调试会话已在运行时,一切工作正常。什么是错的?

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?

感谢您的帮助。

推荐答案

我有同样的问题,试图在Qt的插件设置的断点(这是基于Windows DLL,S)。

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

我发现这个讨论和解决方案完美地工作对我来说,虽然我使用Eclipse的新版本比你听起来像很多同样的问题。

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

基本上,它是使用支持延迟断点的旧gdb协议。 。使用标准创建进程启动器,而不是GDB(DSF)创建进程启动器,从调试配置,我得到现在把我所有的DLL断点

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.

版本:太阳神发布
版本号:20100617-1415

Version: Helios Release Build id: 20100617-1415

CDT和GDB版本7.0.0。

CDT and GDB version 7.0.0.

运气!

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

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