What is the format (schema) of .NET PDB files?
Asked Answered
C

3

6

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.

Carruth answered 8/2, 2009 at 22:50 Comment(0)
A
9

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...

Autoicous answered 8/2, 2009 at 23:25 Comment(0)
C
7

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.

Cynthiacynthie answered 15/4, 2009 at 21:45 Comment(0)
R
2

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

Radioluminescence answered 8/2, 2009 at 22:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.