错误消息:无法找到或打开PDB文件

时间:2013-04-10 22:34:54

标签: visual-studio-2010 cuda nvidia windows-7-x64

我尝试运行NVIDIA's official site提供的示例程序。大多数程序运行顺利,除了少数我收到类似错误消息的地方。我该如何解决这个问题?这是运行名为“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)

6 个答案:

答案 0 :(得分:111)

PDB文件是Visual Studio特定文件,其中包含项目的调试符号。您可以忽略这些消息,除非您希望使用调试器进入这些dll的代码(这是可疑的,因为它们是系统dll)。换句话说,你可以而且应该忽略它们,因为你没有任何这些dll的PDB文件(至少默认情况下,你可以通过Microsoft Symbol Server进行调试时实际获得它们)。所有这一切都意味着当你设置断点并踩过代码时,你将无法进入任何这些dll(你不想做任何事情)。

为了完整起见,这是来自MSDN的官方PDB描述:

  

程序数据库(PDB)文件包含调试和项目状态信息,允许增量链接程序的Debug配置。使用/ ZI或/ Zi

编译C / C ++程序时,将创建PDB文件

另外为了将来参考,如果你想拥有自己代码的PDB文件,你将不得不使用/ ZI或/ Zi选项来构建你的项目(你可以通过项目属性设置它们 - > C / C ++ - >常规,然后设置“调试信息格式”字段。与您的情况无关,但我认为它可能在将来有用

答案 1 :(得分:32)

使用VS 2013.尝试以下工具 - >选项 - >调试 - >输出窗口 - >模块加载消息 - >关闭它将禁用所加载模块的显示。

答案 2 :(得分:19)

如果该消息困扰您,您需要运行具有管理权限的Visual Studio才能在Visual Studio上应用此方向。

工具 - >选项 - > Debugging->符号并选中“Microsoft Symbol Servers”复选框,标记加载所有模块,然后单击“加载所有符号”。

其他所有Visual Studio都会为您完成此任务,您将在“输出”窗口的“调试”下显示此消息 “Native”已退出代码0(0x0)“

答案 3 :(得分:5)

  1. 请检查Project Propeties>下的Generate Debug Info设置是否为Yes。配置属性>链接器>调试选项卡。如果没有,请尝试将其更改为是。

  2. 那些特定的pdb(适用于ntdll.dll,mscoree.dll,kernel32.dll等)适用于Windows API,简单应用程序不应该使用它。 但是,如果你找不到自己编译项目的pdb,我建议你确保项目属性>配置属性>调试>工作目录使用Project Properties>中的值。配置属性>一般>输出目录。

  3. 您需要在“以管理员身份运行”模式下运行Visual c ++。右键单击可执行文件,然后单击“以管理员身份运行”

答案 4 :(得分:3)

我也是CUDA / Visual studio的新手,并且在几个样本中遇到了同样的问题。如果您运行DEBUG->开始调试,然后重复跳过(F10),您将看到输出窗口出现并填充。正常执行返回正常完成状态0x0(如您所见)并且输出窗口关闭。

答案 5 :(得分:0)

如果在visual studio中发生这种情况,请清理项目并再次运行。

构建 - >清洁解决方案

运行(或F5)