错误消息:找不到或打开PDB文件
我尝试运行NVIDIA官方网站上提供的示例程序。 大多数程序运行平稳,除非我得到类似的错误信息。 我该如何解决这个问题? 下面是运行名为“MatrixMul”的程序后得到的错误消息示例。
注意:我在Window7x64操作系统上安装了x32和x64 NVIDIA CUDA Toolkit v5.0。
'matrixMul.exe': Loaded 'C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.0\bin\win32\Debug\matrixMul.exe', Symbols loaded. 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Program Files (x86)\NVIDIA GPU Computing Toolkit\CUDA\v5.0\bin\cudart32_50_35.dll', Binary was not built with debug information. 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\apphelp.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\AppPatch\AcLayers.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\shell32.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\userenv.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\profapi.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\winspool.drv', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\mpr.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\nvinit.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\nvcuda.dll', Binary was not built with debug information. 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file 'matrixMul.exe': Unloaded 'C:\Windows\SysWOW64\dwmapi.dll' 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\nvapi.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\version.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\wintrust.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\crypt32.dll', Cannot find or open the PDB file 'matrixMul.exe': Loaded 'C:\Windows\SysWOW64\msasn1.dll', Cannot find or open the PDB file The thread 'Win32 Thread' (0x12fc) has exited with code 0 (0x0). The thread 'Win32 Thread' (0x18a0) has exited with code 0 (0x0). The program '[3104] matrixMul.exe: Native' has exited with code 0 (0x0)
PDB文件是一个Visual Studio特定文件,其中包含项目的debugging符号。 你可以忽略这些消息,除非你希望用debugging器(这是可疑的,因为这些是系统dll)进入这些dll的代码。 换句话说,你可以而且应该忽略它们,因为你不会有任何这些DLL的PDB文件(至less默认情况下,事实certificate,通过Microsoft Symbol Server进行debugging时实际上可以获得它们)。 所有这一切意味着,当你设置一个断点并逐步完成代码时,你将无法进入任何这些dll(你不想这样做)。
为了完整起见,下面是MSDN的官方PDB描述:
程序数据库(PDB)文件包含debugging和项目状态信息,允许程序的debuggingconfiguration的增量链接。 使用/ ZI或/ Zi编译C / C ++程序时会创build一个PDB文件
另外为了将来的参考,如果你想拥有自己的代码的PDB文件,你将不得不build立你的项目与启用/ ZI或/ Zi选项(你可以通过项目属性 – > C / C ++ – – >常规,然后设置“debugging信息格式”字段)。 与你的情况无关,但我认为它可能在未来有用
使用VS 2013.尝试下面的工具 – >选项 – >debugging – >输出窗口 – >模块加载消息 – >closures它将禁用加载模块的显示。
如果此消息打扰您,则需要使用pipe理权限运行Visual Studio以在Visual Studio上应用此方向。
工具 – >选项 – >debugging – >符号,然后select“Microsoft Symbol Servers”checkbox,标记加载所有模块,然后单击加载所有符号。
其他一切Visual Studio将为你做,并且你会有这个消息在debugging输出窗口“本机”退出代码0(0x0)“
-
请检查“项目属性”>“configuration属性”>“链接器”>“debugging”选项卡下的“生成debugging信息”设置为“是”。 如果不是,请尝试将其更改为是。
-
那些特别的pdb(对于ntdll.dll,mscoree.dll,kernel32.dll等)是针对Windows API的,不应该被简单的应用程序需要。 但是,如果找不到自己编译项目的pdb,build议确保“项目属性”>“configuration属性”>“debugging”>“工作目录”使用“项目属性”>“configuration属性”>“常规”>“输出目录”中的值。
-
您需要在“以pipe理员身份运行”模式下运行Visual c + +。右键单击该可执行文件,然后单击“以pipe理员身份运行”
我也是CUDA / Visual Studio的新手,并且遇到了几个样本的同样的问题。 如果你运行DEBUG-> Start Debugging,然后重复(F10)你会看到输出窗口出现并被填充。 正常执行返回正常完成状态0x0(如您所见),并且输出窗口closures。
如果这发生在Visual Studio然后清理您的项目,并再次运行。
build立 – >清洁解决scheme
运行(或F5)