Question

What is the format (schema) of .NET PDB files? I'd like to parse the information out of these files so that I can display the correct lines of code (line numbers) in a debugging application.

Was it helpful?

Solution

dbghelp library (straightforward):

http://msdn.microsoft.com/en-us/library/ms679309(VS.85).aspx

DIA SDK (more comprehensive, but COM):

http://msdn.microsoft.com/en-us/library/x93ctkx8(VS.80).aspx

I've only used dbghelp myself, and only for native binaries. I found it pretty easy to use, if all you need to do is convert address to file name and line number. Can't say whether it works for managed apps too, but if not then it looks like the DIA SDK does.

As for the PDB format, to quote the DIA page, "Because the format of the .pdb file generated by the postcompiler tools undergoes constant revision, exposing the format is impractical". So that's that, I suppose...

OTHER TIPS

As I explain in this blog post, the CCI project just went open source and for the first time the community has a 100% managed framework to read PDB files.

have taken a look at the tool help/ debug help API http://msdn.microsoft.com/en-us/magazine/cc301692.aspx?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top