我已经使用 eclipse 创建并成功编译了一个适用于 Linux 的 C++ 应用程序。当我从命令行调试它时,一切都很完美,我可以很好地调试。
但我需要在eclipse中调试,因为这样更方便、容易。我配置了调试会话,当尝试启动它时,出现错误:
Error in final launch sequence
Failed to execute MI command:
-exec-run
Error message from debugger back end:
Warning:\nCannot insert breakpoint 1.\nCannot access memory at address 0x1fff82e8\nCannot insert breakpoint 2.\nCannot access memory at address 0x80001ea4\n
Warning:\nCannot insert breakpoint 1.\nCannot access memory at address 0x1fff82e8\nCannot insert breakpoint 2.\nCannot access memory at address 0x80001ea4\n
但我不知道为什么会收到这个错误,特别是因为当我从 cmd 执行 gdb 时它工作正常。
这些是我在 Eclipse 中的 C++ 编译器标志:
-std=c++98 -O0 -g3 -Wall -c -fmessage-length=0
创建项目时,我选择“Hello world C++ Project”和“Linux GCC”作为工具链。
我正在使用以下版本的 GDB 和 Eclipse:
- Eclipse Neon.1a 版本 (4.6.1)
- GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1
我重现此问题的唯一方法是启用地址断点。就我而言,这是 CDT 中的一个错误,但与此同时,作为解决方法,可以从断点 view.
我已提交错误 509894 https://bugs.eclipse.org/bugs/show_bug.cgi?id=509894在 CDT 中跟踪问题。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)