Creating a module that will decode structures defined in a PDB document; can anyone provide me wi开发者_如何学Goth a module that would extract the required debugging symbols from the PDB document? Thanks.
You want the Debug Interface Access (DIA) SDK. It's COM-based, but it's the most powerful and flexible way to deal with PDBs, and it abstracts away all of the version-to-version PDB format changes. It ships with Visual Studio, and the headers and libraries can be found under your VS installation directory.
MSDN also has a fairly complete example of dumping a PDB that includes dumping out type information.
The alternative to DIA is the Debug Help (DbgHelp) library. It has a simpler interface, but it exposes less functionality than DIA. For what you want, I imagine you'd use the SymGetTypeInfo
method.
精彩评论