gdb在Eclipse中失败 [英] gdb failing in Eclipse

查看:801
本文介绍了gdb在Eclipse中失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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



如果我构建一个64位应用程序并使用Eclipse(使用GCC与GCC捆绑在一起)进行调试,那么它将无错误地构建并调试正常。



当我构建一个32位应用程序并尝试使用Eclipse进行调试时,它可以正常工作,但gdb失败:

  gdb:未知的目标异常0x4000001f ... 

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



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



FYI:这里有一些警告提示到gdb异常:

 警告:`C:\Windows\system32\\\
tdll.dll':共享库架构i386:x86-64与目标架构i386不兼容。
警告:`C:\Windows\SYSTEM32\wow64.dll':共享库架构i386:x86-64与目标架构i386不兼容。
警告:`C:\Windows\SYSTEM32\wow64win.dll':共享库架构i386:x86-64与目标架构i386不兼容。
警告:`C:\Windows\SYSTEM32\wow64cpu.dll':共享库架构i386:x86-64与目标架构i386不兼容。
警告:无法加载ntdll32.dll的共享库符号。
你需要set solib-search-path还是set sysroot?
警告:无法加载WOW64_IMAGE_SECTION的共享库符号。
你需要set solib-search-path还是set sysroot?
警告:无法加载WOW64_IMAGE_SECTION的共享库符号。
你需要set solib-search-path还是set sysroot?
警告:无法加载NOT_AN_IMAGE的共享库符号。
你需要set solib-search-path还是set sysroot?
警告:无法加载NOT_AN_IMAGE的共享库符号。
你需要set solib-search-path还是set sysroot?


解决方案

我在另一种情况下遇到了类似的问题,但是认为解决方案也应该适用于这里。



我是从 http://www.equation.com/servlet/equation.cmd?fa=gdb 来调试C ++程序。
我第一次尝试64位,因为我的电脑是64位,但我得到了与保罗上面相同的错误。然后我尝试了32位gdb.exe,它的工作。



我还遵循保罗给出的链接,还有可用于32位的软件包。所以我认为bundle依赖于应用程序的类型而不是平台的配置。但是,我怀疑64位软件包将在32位架构上工作。我没有尝试,不能肯定地说。



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

Here is the tool stack: Installed on Windows 7 (x64) is Eclipse (Juno x64) with CDT and the SConsolidator plugin. Underneath is the TDM-GCC (x64) bundle installed with 64-bit support.

If I build a 64-bit application and debug it using Eclipse (which uses gdb bundled with GCC), it builds without error and debugs fine.

When I build a 32-bit application and try to debug it with Eclipse, it builds fine but gdb fails:

gdb: unknown target exception 0x4000001f... 

Debugging it with the same gdb via command line works fine.

Any ideas on how to work around this?

FYI: Here are some warnings leading up to the gdb exception:

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"?

解决方案

I had a similar problem in a different scenario but i think the solution should be applicable here too.

I was gdb.exe downloaded from http://www.equation.com/servlet/equation.cmd?fa=gdb to debug a C++ program. I first tried the 64-bit because my pc is 64-bit but I got the same error as Paul got above. Then I tried 32-bit gdb.exe and it worked.

I also followed the links that were given by Paul and there was also bundle available for 32-bit. So I assume the bundles depend on the type of application rather than the configuration of the platform. But, I doubt 64-bit bundle will work on 32-bit architecture. I haven't tried that and can't say for sure.

I suggest install the bundles that support 32-bit to debug a 32-bit application.

这篇关于gdb在Eclipse中失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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