WinDbg找不到微软符号

时间:2016-06-27 19:56:19

标签: windbg

我有一个简单的演示控制台程序来调试,但令人惊讶的是windbg不能来自Microsoft默认存储的符号。

我做

  

.reload / f

我得到摘要:

var inputs = document.getElementsByClassName('minds-subscribe-button'); for(var i=0; i<inputs.length;i++) {if(!$(inputs[i]).hasClass("subscribed")){
   inputs[i].click();
}}

符号文件路径是

  

SRV *

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

更新

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

尽管如此,这条消息还不是很清楚。例如,当我设置并添加其他路径时,请说好。

************* 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.

现在当我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

我不知道为什么无法加载路径************* 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

2 个答案:

答案 0 :(得分:3)

在WinDbg会话的输出中有

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

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

当然,您尚未将应用程序的符号上传到Microsoft,因此无法在 https://msdl.microsoft.com/download/symbols 上找到这些符号。

在我看来,你的申请是

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

因此,

  • 除了Microsoft符号服务器(请使用.symfix c:\path\to\microsoft-symbols),
  • 确保为应用程序构建了PDB(检查编译器和/或链接器设置,具体取决于编程语言)
  • 将您自己的符号添加到符号路径(.sympath+ c:\path\to\pdb\)。
  • .reload符号

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

如果仍然无效,请使用!sym noisy Process Monitor对符号加载进行问题排查。 .pdb的文件名过滤器应该会有所帮助。

原因是

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

    帮助文件表示按此顺序加载符号

    • X:\...\symbols\<ext>\<filename>.pdb
    • X:\...\<ext>\<filename>.pdb
    • X:\...\<filename>.pdb

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

    • X:\...\<filename>.pdb
    • X:\...\<ext>\<filename>.pdb
    • X:\...\symbols\<ext>\<filename>.pdb

答案 1 :(得分:0)

srv*的意思是你所拥有的一切是什么? 路径在哪里?
比如说c:\ symbols 或者f:\ mycrap \ myuselesssymbols等等?

路径应该是 srv *&lt;您的本地目录&gt;即X:\ yyyyyy * http://msdl.microsoft.com/download/symbols

您可以使用.symfix在 .reload / f 之前设置默认符号路径

相关问题