如何从 PDB 文件中获取 GUID?
有谁知道如何从 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
有一个名为 PDB Inspector 的代码项目工具应该可以帮助您。或者,如果您本质上需要以编程方式执行此操作,则可以调用:
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:
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.
我会使用 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.