【问题标题】:gdb failing in Eclipsegdb 在 Eclipse 中失败
【发布时间】:2012-08-25 16:13:33
【问题描述】:

这里是工具栈:安装在 Windows 7 (x64) 上的是带有 CDT 和 SConsolidator 插件的 Eclipse (Juno x64)。下面是安装了 64 位支持的 TDM-GCC (x64) 包。

如果我构建一个 64 位应用程序并使用 Eclipse(它使用与 GCC 捆绑在一起的 gdb)对其进行调试,它构建时不会出错并且调试良好。

当我构建一个 32 位应用程序并尝试使用 Eclipse 对其进行调试时,它构建良好但 gdb 失败:

gdb: unknown target exception 0x4000001f... 

通过命令行使用相同的 gdb 调试它可以正常工作。

关于如何解决这个问题的任何想法?

仅供参考:以下是导致 gdb 异常的一些警告:

warning: `C:\Windows\system32\ntdll.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386.
warning: `C:\Windows\SYSTEM32\wow64.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386.
warning: `C:\Windows\SYSTEM32\wow64win.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386.
warning: `C:\Windows\SYSTEM32\wow64cpu.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386.
warning: Could not load shared library symbols for ntdll32.dll.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for WOW64_IMAGE_SECTION.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for WOW64_IMAGE_SECTION.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for NOT_AN_IMAGE.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for NOT_AN_IMAGE.
Do you need "set solib-search-path" or "set sysroot"?

【问题讨论】:

    标签: eclipse gdb scons eclipse-cdt


    【解决方案1】:

    我在不同的场景中遇到了类似的问题,但我认为该解决方案也应该适用于此。

    我是从http://www.equation.com/servlet/equation.cmd?fa=gdb下载gdb.exe来调试一个C++程序的。 我首先尝试了 64 位,因为我的电脑是 64 位的,但我得到了与上面 Paul 相同的错误。然后我尝试了 32 位 gdb.exe,它成功了。

    我还关注了 Paul 提供的链接,并且还有适用于 32 位的捆绑包。所以我假设捆绑包取决于应用程序的类型而不是平台的配置。但是,我怀疑 64 位捆绑包是否适用于 32 位架构。我没试过,也不能肯定。

    我建议安装支持 32 位的包来调试 32 位应用程序。

    【讨论】:

    • 我在 Windows 7 x64 上的 Eclipse Kepler x64 中遇到了同样的问题。这种方法对我有用。
    • 另见:stackoverflow.com/questions/40680886/…。那么我们必须坚持使用单独的 32 位二进制文​​件吗?
    猜你喜欢
    • 2012-08-16
    • 1970-01-01
    • 1970-01-01
    • 2012-12-14
    • 2015-07-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多