eclipse中调试共享库的问题

发布于 2024-10-31 13:21:11 字数 121 浏览 0 评论 0原文

我的项目由多个共享库和一个可执行文件组成。我尝试从共享库调试我的代码,但调试器永远不会在断点处停止,并且每个断点都会收到警告:“断点属性问题:安装失败。”。有人可以向我解释这个问题或为我提供解决方法。

提前致谢。

My project consists of several shared libraries and one executable. I tried to debug my code from shared library but debugger never stops on breakpoints and I get warnings for each breakpoint: "Breakpoint attribute Problem: Installation Failed.". Can someone explain me this problem or provide workaround for me.

Thanks in advance.

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

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

发布评论

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

评论(2

岁吢 2024-11-07 13:21:11

在尝试设置断点之前,您是否启动了程序(使其加载共享库)?如果您以相反的方式执行此操作(在启动程序之前设置断点),则可能无法工作,因为共享库代码尚未加载。

Did you start the program (causing it to load the shared libraries) before trying to set the breakpoints? If you did it the other way around (set breakpoints before starting the program), it's likely not to work because the shared library code hasn't been loaded.

双马尾 2024-11-07 13:21:11

不知道这是否会对你有帮助,但经过一番努力后,我放弃了在 Eclipse 中进行调试,转而使用旧的 gdb(无论如何,它是 Eclipse 调试的后端) - 它太慢了,令人烦恼。您会比预期更快地习惯命令行界面,而且它快速、方便、直观且功能强大。我喜欢使用 UI 和 IDE,但不惜一切代价。 gdb 有几个 UI“包装器”,ddd 是最流行的之一,但它们也并不完美。

至于共享库 - 如果您尝试在加载库之前设置断点,gdb 将发出警告并建议记住它并在将来加载时激活。或者您可以单步执行程序直到加载库。

don't know if this will help you, but after some struggle I gave up debugging in eclipse and moved to the good old gdb (which is the backend for eclipse debugging anyway) - it was annoyingly too slow. You get used to command line interface sooner that you expect, and it's fast, convenient, intuitive yet powerful. I like working with UI and IDE but not at any cost. gdb has several UI "wrappers", ddd is one the most populars but they are not perfect either.

As for shared libraries - if you try to set a breakpoint before the library is loaded gdb will issue a warning and suggest to remember it and activate on future load. Or you can step through the program until the library is loaded.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文