如何从 PDB 文件中获取 GUID?

发布于 2024-08-26 09:07:36 字数 435 浏览 4 评论 0原文

有谁知道如何从 PDB 文件中获取 GUID?

我正在使用 Microsoft 的调试接口访问 SDK

http://msdn.microsoft.com /en-us/library/f0756hat.aspx

并在尝试加载 PDB 时传入我期望的 GUID 时获取 E_PDB_INVALID_SIG 。

我只是想知道 PDB 的 GUID,这样我就可以确定它不匹配,而不仅仅是 PDB 可能以某种方式损坏。

有没有一个工具可以做到这一点?我尝试过 dia2dump 和 dumpbin,但没有任何乐趣......

非常感谢,

thoughton。

Does anyone know how to get the GUID from a PDB file?

I'm using Microsoft's Debug Interface Access SDK

http://msdn.microsoft.com/en-us/library/f0756hat.aspx

and getting E_PDB_INVALID_SIG when passing in the GUID i expect when trying to load the PDB.

I'd just like to know the GUID of the PDB so I can be certain that it's mismatching and not just a PDB that's perhaps corrupted somehow.

Is there a tool that can do this? I've tried dia2dump and dumpbin, but with no joy...

Many thanks,

thoughton.

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

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

发布评论

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

评论(3

与之呼应 2024-09-02 09:07:36

有一个名为 PDB Inspector 的代码项目工具应该可以帮助您。或者,如果您本质上需要以编程方式执行此操作,则可以调用:

IDiaDataSource::LoadDataFromPdb
IDiaDataSource::openSession
IDiaSession::get_global_scope
IDiaSymbol::get_guid

There is a Code Project tool called PDB Inspector that should be able to help you. Or if you need to do this programatically essentially you call:

IDiaDataSource::LoadDataFromPdb
IDiaDataSource::openSession
IDiaSession::get_global_scope
IDiaSymbol::get_guid
为人所爱 2024-09-02 09:07:36

DIA 简介及其与 DbgHelp 的关系以及 C++ 示例。这基本上是我在保罗·阿诺德提到的那篇文章之后写的文章。

an introduction to DIA and its relation to DbgHelp along with a C++ sample. Which is basically the article I wrote after the one mentioned by Paul Arnold.

靑春怀旧 2024-09-02 09:07:36

我会使用 dbghelp 符号 API。如果您想要的只是有关 PDB 的信息,可以使用 chkmatch on archive.org,或者哎呀,只需将 dll/exe 加载到 WinDbg 中并使用 !sym busy!lmi 或 <代码>!chksym。

修复 PDB 以匹配是另一回事! chkmatch 可以做一些工作,但不能使年龄差异匹配,它只能做时间戳和 GUID 签名。

I would use the dbghelp symbol APIs. If all you want is information about the PDB, you can use chkmatch on archive.org, or heck, just load the dll/exe into WinDbg and use !sym noisy, !lmi or !chksym.

Fixing the PDB to match is a different story! chkmatch can do some of the work, but cannot make age differences match, it only can do timestamps and GUID signatures.

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