WinDbg,显示已加载模块的符号服务器路径(即使符号未加载)?

发布于 2024-08-16 09:24:22 字数 453 浏览 11 评论 0原文

WinDbg 有没有办法在不使用 DbgEng API 的情况下显示符号服务器路径(即 PdbSig70 和 PdbAge) 对于所有加载的模块?

我知道

lml

这适用于已加载符号的模块。我想知道未加载符号的这些路径,以便诊断问题。有人知道这是否可以在不使用 DbgEng API 的情况下实现吗?

编辑:

我还意识到您可以用来

!sym noisy

获取有关符号加载的错误消息。虽然这确实有有用的输出,但它与我想要的其他输出交织在一起,并且不像“lml”那样简单明了

Is there a way from WinDbg, without using the DbgEng API, to display the symbol server paths (i.e. PdbSig70 and PdbAge) for all loaded modules?

I know that

lml

does this for the modules whose symbols have loaded. I would like to know these paths for the symbols that did not load so as to diagnose the problem. Anyone know if this is possible without having to utilize the DbgEng API?

edited:

I also realize that you can use

!sym noisy

to get error messages about symbols loading. While this does have helpful output it is interleaved with other output that I want and is not simple and clear like 'lml'

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

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

发布评论

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

评论(3

恬淡成诗 2024-08-23 09:24:22

!sym嘈杂和!sym安静可以打开符号加载的附加输出,即:

!sym noisy
.reload <dll>
X <some symbol in that DLL to cause a load>
!sym quiet

当调试器尝试加载PDB时,您将看到它尝试加载的每个路径以及PDB是否未找到或被拒绝。

!sym noisy and !sym quiet can turn on additional output for symbol loading, i.e.:

!sym noisy
.reload <dll>
X <some symbol in that DLL to cause a load>
!sym quiet

When the debugger attempts to load the PDB you will see every path that it tries to load and if PDB's weren't found or were rejected.

晨曦慕雪 2024-08-23 09:24:22

据我所知,windbg 中没有现成的解决方案。
您的选择是编写一个漂亮的脚本或一个扩展,具体取决于您最适合的位置。

它作为脚本在 Windbg 中非常可行。您需要的信息在 PE 调试目录中描述。

这是 C++ 示例代码的链接,详细介绍了如何提取有用信息(就像您案例中符号文件的名称)。使其适应 Windbg 脚本应该不费吹灰之力。

这是另一个有用的 指针 包含大量有关自动化 Windbg 的信息。特别是,它讨论了将参数传递给 Windbg 脚本的方法(这在您的情况下也很有用,拥有一个可以从加载的模块迭代循环中调用的通用调试信息提取代码)。

To my knowledge there's no ready solution in windbg.
Your options would be to either write a nifty script or an extension dependent on where you're the fittest.

It is pretty doable within windbg as a script. The information you're after is described in the PE debug directory.

Here's a link to the c++ sample code that goes into detail on extracting useful information (like the name of the symbol file in your case). Adapting it to windbg script should be no sweat.

Here's another useful pointer with tons of information on automating windbg. In particular, it talks about ways of passing arguments to windbg scripts (which is useful in your case as well, to have a common debug info extraction code which you can invoke from within the loaded modules iteration loop).

挽手叙旧 2024-08-23 09:24:22

您可以使用该命令

lme

显示未加载任何符号的模块。

You can use the command

lme

to show the modules that did not have any symbols loaded.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文