WinDbg 找不到微软符号 [英] WinDbg can't find microsoft symbols

查看:25
本文介绍了WinDbg 找不到微软符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的演示控制台程序来调试,但令人惊讶的是,windbg 无法从 Microsoft 默认存储中获取符号.

I have a simple demo console program to debug but surprisingly windbg can't symbols from Microsoft default store.

我愿意

.reload/f

我得到了摘要:

************* Symbol Loading Error Summary ************** 
Module name            Error 
ConsoleApp             PDB not found : cache*
                Unable to locate the .pdb file in this location

                The system cannot find the file specified : SRV*https://msdl.microsoft.com/download/symbols
                The SYMSRV client failed to find a file in the UNC store, or there
                is an invalid UNC store (an invalid path or the pingme.txt file is
                not present in the root directory), or the file is present in the
                symbol server exclusion list.

符号文件路径是

服务*

我试图开始使用我自己的应用程序的 pdf 文件,但它甚至找不到微软符号.

I was trying to get to work with pdf files of my own application but it can't even find microsoft symbols.

更新

整理其他问题后,我可以重现这个.好像我只是读错了消息.由于错误消息指向微软默认商店,我读它就像没有在微软商店找到指定的文件......认为它没有连接/查找/下载微软符号,而实际上主要错误说它只是没有找不到我自己的应用程序的符号.

After sorting out other issues, I can reproduce this back. It seems like I was just reading the message wrong. Since the error message was pointing to Microsoft default store, I read it like it didn't find the specified files at Microsoft store...thinking it was not connecting/finding/downloading Microsoft symbols when in fact the major error says it just didn't find my own's application's symbols.

不过,消息还不是很清楚.例如,当我设置并添加一个额外的路径时,说 Ok.

Still, the message is not super clear. For example when I set and add an additional path, says Ok.

0:000> .sympath srv*c:\test\Symbols*https://msdl.microsoft.com/download/symbols;c:\test\hello
DBGHELP: Symbol Search Path: srv*c:\test\symbols*https://msdl.microsoft.com/download/symbols;c:\test\hello
DBGHELP: Symbol Search Path: srv*c:\test\symbols*https://msdl.microsoft.com/download/symbols;c:\test\hello
Symbol search path is: srv*c:\test\Symbols*https://msdl.microsoft.com/download/symbols;c:\test\hello
Expanded Symbol search path is: srv*c:\test\symbols*https://msdl.microsoft.com/download/symbols;c:\test\hello

************* Symbol Path validation summary **************
Response                         Time (ms)     Location
Deferred                                       srv*c:\test\Symbols*https://msdl.microsoft.com/download/symbols
OK                                             c:\test\hello

现在当我 .reload/f 符号加载错误摘要是这样的:

Now when I .reload /f the symbol loading error summary is this:

************* Symbol Loading Error Summary **************
Module name            Error
App                    The system cannot find the file specified : srv*c:\test\symbols*https://msdl.microsoft.com/download/symbols
                The SYMSRV client failed to find a file in the UNC store, or there
                is an invalid UNC store (an invalid path or the pingme.txt file is
                not present in the root directory), or the file is present in the
                symbol server exclusion list.

                       PDB not found : c:\test\hello\symbols\exe\App.pdb
                Unable to locate the .pdb file in this location

我不知道为什么在路径中无法加载PDB not found : c:\test\hello\symbols\exe\App.pdb?

I don't know the why unable to load in the path PDB not found : c:\test\hello\symbols\exe\App.pdb?

推荐答案

在 WinDbg 会话的输出中有

In the output of your WinDbg session there is

************* Symbol Loading Error Summary ************** 
Module name            Error 
ConsoleApp             PDB not found : cache*

因此 ConsoleApp 存在模块加载错误,这是您的应用程序,而不是 Microsoft 应用程序.

so there's a module load error for ConsoleApp, which is your application and not a Microsoft application.

当然,您还没有将应用程序的符号上传到 Microsoft,因此在 https://msdl.microsoft.com/download/symbols.

Certainly you have not uploaded the symbols of your application to Microsoft, so the symbols cannot be found on https://msdl.microsoft.com/download/symbols.

在我看来,您的应用程序是

It seems to me that your application is

  • 完全没有符号信息的发布版本
  • 带有符号信息的调试版本,但在应用程序中指定的路径中找不到符号

因此,

  • 除了微软符号服务器(请使用.symfix c:\path\to\microsoft-symbols),
  • 确保您已经为您的应用程序构建了 PDB(检查您的编译器和/或链接器设置,具体取决于编程语言)
  • 将您自己的符号添加到符号路径 (.sympath+ c:\path\to\pdb\).
  • .reload 符号
  • in addition to the Microsoft symbol server (please use .symfix c:\path\to\microsoft-symbols),
  • make sure you have built PDBs for your application (check your compiler and/or linker settings, depending on the programming language)
  • add your own symbols to the symbol path (.sympath+ c:\path\to\pdb\).
  • .reload the symbols

语法 srv* 已记录,但实际上我从未见过有人在实践中使用它,因为人们希望从本地存储的符号中受益,从而提高性能.

The syntax srv* is documented, but actually I've never seen someone use it in practice, because people want to benefit from symbols stored locally, which increases the performance.

如果仍然不起作用,请使用 !sym noise Process Monitor 来解决符号加载的问题..pdb 的文件名过滤器应该会有所帮助.

If it still does not work, use !sym noisy and Process Monitor to troubleshoot loading of the symbols. A file name filter for .pdb should help.

原因是

  • 即使使用 !sym noise,WinDbg 也不会列出它实际查找符号的所有路径
  • 符号加载顺序的文档不正确.

  • even with !sym noisy, WinDbg does not list all paths where it is actually looking for symbols
  • the documentation for the symbol load order is incorrect.

帮助文件说符号是按这个顺序加载的

The help file says that symbols are loaded in this order

  • X:\...\symbols\\.pdb
  • X:\...\\.pdb
  • X:\...\<文件名>.pdb

但是我观察到的加载顺序是

But the load order observed by me is

  • X:\...\<文件名>.pdb
  • X:\...\\.pdb
  • X:\...\symbols\\.pdb

这篇关于WinDbg 找不到微软符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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