windows 尝试读取转储时“无法加载符号”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12039/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
"Symbols can not be loaded" when trying to read dump
提问by staffan
I have an application that sometimes causes a BSOD on a Win XP machine. Trying to find out more, I loaded up the resulting *.dmp file (from C:\Windows\Minidump), but get this message when in much of the readout when doing so:
我有一个应用程序有时会导致 Win XP 机器上出现蓝屏。为了了解更多信息,我加载了生成的 *.dmp 文件(来自 C:\Windows\Minidump),但在执行此操作时在大部分读数中会收到此消息:
*********************************************************************
* Symbols can not be loaded because symbol path is not initialized. *
* *
* The Symbol Path can be set by: *
* using the _NT_SYMBOL_PATH environment variable. *
* using the -y <symbol_path> argument when starting the debugger. *
* using .sympath and .sympath+ *
*********************************************************************
What does this mean, and how do I "fix" it?
这是什么意思,我该如何“修复”它?
回答by Chris Jester-Young
I usually go to the System control panel, then Advanced tab, then Environment. You can then add the requisite _NT_SYMBOL_PATH
variable. Then you don't have to do anything on the command-line before running WinDbg.
我通常去系统控制面板,然后高级选项卡,然后环境。然后,您可以添加必要的_NT_SYMBOL_PATH
变量。然后在运行 WinDbg 之前您不必在命令行上执行任何操作。
The setting of srv*C:\Windows\Symbols*http
://msdl.microsoft.com/download/symbols
as suggested by staffan is fine. I usually prefer to use my own profile for storing symbols though (so that I don't need to edit the permissions for C:\Windows\Symbols
, since I intentionally run as a limited user, for good security hygiene). Thus (in my case) my _NT_SYMBOL_PATH
is srv*C:\Documents and Settings\cky\symbols*http
://msdl.microsoft.com/download/symbols
.
设置srv*C:\Windows\Symbols*http
://msdl.microsoft.com/download/symbols
就像 Staffan 建议的那样很好。不过,我通常更喜欢使用我自己的配置文件来存储符号(这样我就不需要编辑 的权限C:\Windows\Symbols
,因为我有意以受限用户身份运行,以保持良好的安全卫生)。因此(就我而言)我_NT_SYMBOL_PATH
是srv*C:\Documents and Settings\cky\symbols*http
://msdl.microsoft.com/download/symbols
。
Hope this helps. :-)
希望这可以帮助。:-)
回答by staffan
Quick answer is to
快速回答是
c:\> set _NT_SYMBOL_PATH=SRV*C:\WINDOWS\Symbols*http://msdl.microsoft.com/download/symbols
c:\> 设置 _NT_SYMBOL_PATH=SRV*C:\WINDOWS\Symbols*http://msdl.microsoft.com/download/symbols
before starting windbg.
在启动windbg之前。
回答by staffan
Quicker answer:
更快的答案:
!symfix
But it only affects the current windbg/ntsd/cdb/kd.
但它只影响当前的windbg/ntsd/cdb/kd。
回答by Vaibhav
you actually need to either download the symbols to your computer, or configure it to download as you go if you are online while debugging.
您实际上需要将符号下载到您的计算机,或者如果您在调试时在线,则将其配置为随时下载。
Here's the link that talks about this in detail: http://www.microsoft.com/whdc/DevTools/Debugging/debugstart.mspx
这是详细讨论此问题的链接:http: //www.microsoft.com/whdc/DevTools/Debugging/debugstart.mspx
回答by Kris Kumler
As @Vaibhav noted, you actually need to download the symbols and configure windbg to use them.
正如@Vaibhav 所指出的,您实际上需要下载符号并配置windbg 才能使用它们。
Also note the following: !sym noisy -- Activates noisy symbol loading lm v -- Use with "m" parameter to look at information for a loaded module. lme D sm - List all modules w/o symbols.
还要注意以下几点: !sym noise -- 激活噪声符号加载 lm v -- 与“m”参数一起使用以查看加载模块的信息。lme D sm - 列出所有没有符号的模块。