调试MFC:“mfc100.dll”找不到或打开pdb [英] Debugging MFC: "mfc100.dll" cannot find or open pdb

查看:405
本文介绍了调试MFC:“mfc100.dll”找不到或打开pdb的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在调试时试图进入MFC源代码。然而,Visual Studio显然在加载适当的符号有问题:

I'm trying to step into MFC source code while debugging. However, Visual Studio apparently has problems with loading the appropriate symbols:


C:\WINDOWS\symbols\dll\mfc100。

C:\WINDOWS\symbols\dll\mfc100.i386.pdb: PDB does not match image.

我检查过SO的其他问题,经常建议启用符号服务器 。这不是帮助,因为它只是似乎下载一个最小的PDB文件(〜2 MB),而不是一个PDB文件,实际上使您能够步入源(〜20 MB)。

I checked other questions on SO, often it is recommended to enable "symbol servers". This is not helping though, because it only seems to download a minimal PDB file (~2 MB) instead of a PDB file that actually enables you to step into the source (~20 MB).

根据无法加载mfc100.dll的符号我应该从 http://msdn.microsoft.com/en-us/windows/hardware/gg463028 。我这样做,但它没有帮助,或者因为这个包实际上不包括mfc100.dll的符号。

According to Cannot load symbols for mfc100.dll I should download a full symbol package from http://msdn.microsoft.com/en-us/windows/hardware/gg463028. I did that, but it doesn't help either because this package does not actually include symbols for mfc100.dll at all.

下一件事我试图复制PDB文件另一个系统。在我的本地Win7操作系统我有一个mfc100.i386.pdb从2011-06-10(24.708 KB)。在系统我调试我有mfc100.i386.pdb从2010-03-18(23.732 KB)。

Next thing I tried is copying PDB files from another system. On my local Win7 OS I have a mfc100.i386.pdb from 2011-06-10 (24.708 KB). On the system I debug I have mfc100.i386.pdb from 2010-03-18 (23.732 KB). Both do "not match image" though.

那么我应该从哪里获取正确的和完整的符号文件?

So where should I get the correct and full symbol files from?

操作系统:Windows 8 x86。 Visual Studio 2013与VS 2010 C ++项目。 mfc100.dll版本: 10.00.40219.01

OS: Windows 8 x86. Visual Studio 2013 with VS 2010 C++ project. mfc100.dll version: 10.00.40219.01

WinDbg !sym noisy 输出:

WinDbg !sym noisy output:

************* Symbol Path validation summary **************
Response                         Time (ms)     Location
OK                                             C:\Windows\symbols\dll
DBGHELP: Symbol Search Path: c:\windows\symbols\dll
DBGHELP: Symbol Search Path: c:\windows\symbols\dll
0:000> .reload
Reloading current modules

DBGHELP: c:\windows\symbols\dll\mfc100.i386.pdb - mismatched pdb
DBGHELP: c:\windows\symbols\dll\dll\mfc100.i386.pdb - file not found
DBGHELP: c:\windows\symbols\dll\symbols\dll\mfc100.i386.pdb - file not found
DBGHELP: C:\WINDOWS\SYSTEM32\mfc100.i386.pdb - file not found
DBGHELP: mfc100.i386.pdb - file not found
DBGHELP: Couldn't load mismatched pdb for C:\WINDOWS\SYSTEM32\mfc100.dll
*** ERROR: Module load completed but symbols could not be loaded for C:\WINDOWS\SYSTEM32\mfc100.dll
DBGHELP: mfc100 - no symbols loaded

************* Symbol Loading Error Summary **************
Module name            Error
mfc100                 PDB not found : c:\windows\symbols\dll\symbols\dll\mfc100.i386.pdb
                Unable to locate the .pdb file in this location


推荐答案

MSDN post (由Crescens2k提供) -

As explained in this MSDN post (by Crescens2k) -


这些符号应与版本VS使用,所以他们可以失去同步,如果你安装一个版本的VC redist比VS目前使用的更新。
检查安装了VS2010的VC目录中CRT的版本。在那里应该有一个redist目录,下面是CRT。检查这些文件的版本,并查看它们是否具有与system32目录中的版本相同的版本。这些通常应该匹配。如果他们没有检查VS的更新。最新版本应为10.0.40219.325,因此请确保VS已更新为使用。

Those symbols should be matched to the version that VS uses, so they can get out of sync if you install a version of the VC redist which is newer than what VS is currently using. Check the version of the CRT in VC directory where VS2010 is installed. There should be a redist directory in there and under that is the CRT. Check the version of these files and see if they have the same version as the ones in your system32 directory. These normally should match. If they don't then check for updates for VS. The latest version should be 10.0.40219.325 so make sure that VS has been updated to use that.



And later -


...尝试手动应用MFC安全更新。

...try manually applying the MFC security update. ... and seeing if that fixes everything.

很高兴地,使用WinDbg工具,您可以找到您的问题不匹配的符号,并建议从有经验的程序员(Crescens2k)帮助解决了DLL地狱的版本不匹配的痛苦的丑陋问题。

Happily, with WinDbg tool you could locate your problem to mismatched symbols, and an advice from experienced programmer (Crescens2k) helped to solve the painfully ugly problem of versions mismatch from "DLL hell".

这篇关于调试MFC:“mfc100.dll”找不到或打开pdb的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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