_NT_SYMBOL_PATH 格式 [英] _NT_SYMBOL_PATH format

查看:21
本文介绍了_NT_SYMBOL_PATH 格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试更多地使用windbg,但符号缓存一直存在问题.我不清楚字符串的格式应该是什么.

I'm trying to use windbg more, and I keep having problems with the symbol cache. It isn't clear to me what the format of the string is supposed to be.

我有几个要求:

我们在 \\foo\Build1234 上的分布式构建的符号存档没有组织为符号服务器.如果我理解正确,我需要使用缓存关键字.

The archive of symbols from our distributed build at \\foo\Build1234 are not organized as a symbol server. If I understand it correctly, I need to use the cache keyword.

鉴于这些要求,这看起来像格式正确的 srvpath 吗:

Given these requirements, does this look like a properly formatted srvpath:

cache*\\foo\Build1234;srv*c:\dev\symbols*http://msdl.microsoft.com/download/symbols

我刚开始阅读高级 Windows 调试,但我误解了缓存关键字的工作原理.我认为这是告诉调试器该文件夹只是一个文件文件夹而不是符号服务器的一种方式.Michael 发表评论后,我重新阅读了该部分,发现它确实如 Michael 所描述的那样有效.

I just started reading Advanced Windows Debugging and I had misinterpreted how the cache keyword works. I thought it was a way of telling the debugger that the folder is just a folder of files and not a symbol server. After Michael left his comment, I reread the section and see that it indeed works as Michael described.

现在我对你何时使用 ; 感到困惑或 * 分隔路径/URL.当您需要 srv* 前缀时.在windbg的在线帮助中,他们给出了这个例子:

Now I'm confused by when you use a ; or a * to separate paths/URLs. And when you need the srv* prefix. In the online help for windbg they give this example:

\\someshare\that\cachestar\ignores;srv*c:\mysymbols*http://msdl.microsoft.com/download/symbols;cache*c:\mysymbols;\\anothershare\that\gets\cached

来自 \\someshare 的符号未缓存,来自 Microsoft 的符号缓存在 c:\mysymbols 中,c:\mysymbols 用作 cache* 指令右侧的任何其他路径的缓存.

The symbols from \\someshare are not cached, symbols from Microsoft are cached in c:\mysymbols, and c:\mysymbols is used as the cache for any other paths to the right of the cache* directive.

偶尔使用 srv* 让我感到困惑——我不明白为什么第一个和最后一个路径没有以 srv* 为前缀.

The occasional use of srv* is confusing me -- I don't understand why the first and last paths aren't prefixed with srv*.

编辑 2:

这对我来说慢慢开始有意义了.srv 指令用于符号服务器,而不用于普通符号目录.所以,我相信我最初的问题的答案是这样的:

This is slowly starting to make sense to me. The srv directive is used for symbol servers, and not for normal symbol directories. So, I believe the answer to my original question is this:

\\foo\Build1234;cache*c:\dev\symbols;srv*http://msdl.microsoft.com/download/symbols

推荐答案

SRV*C:\dev\symbols*http://msdl.microsoft.com/download/symbols;\\foo\build1234

应该可以正常工作,如果 \\foo\build1234 只是平面 PDB.这里不需要缓存;您只需将该目录添加到您的符号路径中即可.

Should work fine, if \\foo\build1234 is just flat PDB's. Cache isn't needed here; you just need to add the directory to your symbol path.

cache 关键字指定要缓存符号文件的位置,对于从非索引共享(如 \\foo\build1234)本地缓存符号很有用

The cache keyword specifies where you want to cache your symbol files, and is useful for caching symbols locally from non-indexed shares (like \\foo\build1234)

cache*C:\dev\symbols;SRV*C:\dev\symbols*http://msdl.microsoft.com/download/symbols;\\foo\build1234

上面的路径将把来自 MS 符号服务器的符号和你的符号共享存储到本地机器的 C:\dev\symbols 中.

The above path would store symbols from MS's symbol server and your symbol share to your local machine in C:\dev\symbols.

要使用 windbg 调试符号问题,请执行

To debug symbol issues using windbg, do

!sym noisy
.reload <some exe or DLL in your session>

然后执行一些强制加载 PDB 的操作.您将看到 windbg 在哪里寻找文件,以及它是否拒绝 PDB 的原因.

And then do some action that would force the PDB to be loaded. You'll see where windbg is looking for files, and if it rejects a PDB why it did so.

!sym quiet

然后将禁止符号提示.

这篇关于_NT_SYMBOL_PATH 格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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