Visual Studio 2008 在调试 .DMP 时不加载符号

发布于 2024-11-07 10:49:43 字数 913 浏览 0 评论 0原文

我正在尝试从 .DMP 文件调试 C# 应用程序,并且可执行文件、DLL 和 PDB 都位于名为“MyFolder”的文件夹中。我将包含源代码的目录设置为 C:\MyFolder\ 但当我尝试调试时它告诉我:

“没有为任何调用堆栈帧加载任何符号。无法显示源代码。”

当我打开符号加载信息时,它指出无法找到以下 PDB:

C:\Windows\System32\kernel32.pdb: 无法找到或打开 PDB 文件。
C:\MyFolder\kernel32.pdb: 找不到或打开 PDB 文件。
C:\MyFolder\symbols\dll\kernel32.pdb: 无法找到或打开 PDB 文件。
C:\MyFolder\dll\kernel32.pdb: 找不到或打开 PDB 文件。
C:\MyFolder\kernel32.pdb: 找不到或打开 PDB 文件。
C:\Windows\symbols\dll\kernel32.pdb: 无法找到或打开 PDB 文件。
C:\Windows\dll\kernel32.pdb: 找不到或打开 PDB 文件。
C:\Windows\kernel32.pdb: 找不到或打开 PDB 文件。

我的 PDB 位于正确的文件夹中,并且它们的时间戳具有完全相同的时间和日期。有人知道这是怎么回事吗?加载符号的正确方法是什么?

如何验证应用程序的符号是否已实际加载(以消除问题)? 我检查了模块,看起来我的项目的所有 DLL 和可执行文件都无法加载符号,特别是符号状态是“符号文件中没有本机符号”...当我右键单击该项目时,我选择“从 -> 符号路径加载符号”,然后选择 PDB C:\MyFolder\MyApplication.pdb,然后它告诉我“MyApplication.pdb 的符号文件与模块不匹配”。

I'm trying to debug a C# application from a .DMP file and I have the executable, the DLLs and the PDBs all in a folder called "MyFolder." I set the directory containing the source code to C:\MyFolder\ but when I try to debug it tells me that:

"No symbols are loaded for any call stack frame. The source code cannot be displayed."

When I open the Symbol Load Information it states that the following PDBs could not be found:

C:\Windows\System32\kernel32.pdb: Cannot find or open the PDB file.
C:\MyFolder\kernel32.pdb: Cannot find or open the PDB file.
C:\MyFolder\symbols\dll\kernel32.pdb: Cannot find or open the PDB file.
C:\MyFolder\dll\kernel32.pdb: Cannot find or open the PDB file.
C:\MyFolder\kernel32.pdb: Cannot find or open the PDB file.
C:\Windows\symbols\dll\kernel32.pdb: Cannot find or open the PDB file.
C:\Windows\dll\kernel32.pdb: Cannot find or open the PDB file.
C:\Windows\kernel32.pdb: Cannot find or open the PDB file.

My PDBs are in the correct folder and they're timestamped with the exact same time and date. Does anybody know what's going on here? What's the proper way to load the symbols?

How do I verify my application's symbols are actually loaded (to eliminate them as the problem)?
I checked the Modules and it looks like all of the DLLs and the executable of my project are unable to load the symbols, specifically the symbol status is "No native symbols in symbol file"... when I right click on the item and I select "Load Symbols From -> Symbol Path" and I select the PDB C:\MyFolder\MyApplication.pdb then it tells me that "The symbol file for MyApplication.pdb does not match the module."

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

悸初 2024-11-14 10:49:43

听起来转储文件是本机代码小型转储,而不是托管代码小型转储,因为所有这些 DLL 的符号通常对于托管调试并不重要,除非您调试混合模式应用程序、调试到 Win32 调用或跨平台调试托管/非托管边界。

这取决于小型转储的创建方式。如果它位于不同操作系统或服务包的不同计算机上,那么您可能需要设置符号路径以从另一台计算机获取系统 DLL 的确切 PDB,而不是您的应用程序程序集和符号。如果这些非托管符号正确,您的托管调试体验将会得到改善。
为了使事情变得更加复杂,您需要使用 .NET“微版本”和本机映像来使堆栈跟踪正常工作。

It sounds like the dump file is a native-code minidump, not a managed-code minidump, since the symbols for all those DLLs are usually not critical for managed debugging unless you debugging a mixed-mode app, debugging into Win32 calls or debugging across managed/unmanaged boundaries.

It depends on how the minidump was created. If it was on a different machine on a different operating system or service pack, then you may need the symbol path set up to get the exact PDBs of the system DLLs from the other machine, not your application assmeblies and symbols. Your managed debugging experience will improve if these unmanaged symbols are correct.
To further complicate things you have .NET "micro-versions" and native images to contend with to get the stack traces working.

嗳卜坏 2024-11-14 10:49:43

您必须确保:

  • 可执行文件/DLL 和 PDB 具有相同的版本。 PDB 在内部使用 GUID 来确定关联的 EXE/DLL 是否正确。否则它不会加载符号。它本身不是 VS,而是来自 DbgHelp.DLL。
  • 确保您使用的源文件集绝对正确。即使“源文件必须匹配”选项在 VS 调试选项中未设置,VS 也不关心加载 .DMP 文件 - 如果源文件不匹配,它不会加载符号。

You must ensure that:

  • Executables/DLLs and PDBs are of same build. PDB internally uses GUIDs to determine if associated EXE/DLLs are correct. Otherwise it won't load the symbols. It is not VS per se, but from DbgHelp.DLL.
  • Ensure you are having absolutely correct using set of source files. Even if "Source file must match" option is unset in VS Debugging options, VS doesn't care when loading .DMP files - it wont load the symbols if sources files don't match.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文