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

KNU*_*KNU 65 cuda nvidia visual-studio-2010 windows-7-x64

我尝试在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)
Run Code Online (Sandbox Code Playgroud)

alr*_*kai 114

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++ - - >常规,然后设置"调试信息格式"字段.与您的情况无关,但我认为它可能在将来有用

  • @Andrew这个评论更倾向于这个问题的具体细节 - 理解Windows系统DLL与运行CUDA示例应用程序是正交的 (7认同)

小智 35

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

  • 我不知道为什么人们会这样回答这些问题; 也许它没有完全回答这个问题,但它是有用的信息.顺便说一下,您也可以右键单击"输出"窗口的文本区域. (15认同)

小智 19

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

工具 - >选项 - >调试 - >符号并选中复选框"Microsoft Symbol Servers",标记加载所有模块,然后单击加载所有符号.

Visual Studio将为您完成所有其他操作,您将在"输出"窗口的"调试"下显示此消息"Native"已退出,代码为0(0x0)"

  • 我按照你的说法做了,但我现在无法点击加载所有符号,因为它是禁用的.它显示此目录中缓存符号的浏览器选项.我不知道该选择什么.我正在使用visual studio 2015. (2认同)

小智 6

  1. 请检查Project Propeties> Configuration Properties> Linker> Debugging选项卡下的Generate Debug Info设置是否为Yes.如果没有,请尝试将其更改为是.

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

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