开发者

How can I get the GUID from a PDB file?

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/libr开发者_如何转开发ary/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.


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


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜