tags:

views:

457

answers:

2

pdb files contain symbol information for .NET assemblies. I'd like to read a pdb file in order to correlate methods with their file location. The data is contained within it but I can't seem to find a good description of how to get it out.

I know about mdbg, but that is very heavy (I think/hope) for what I want.

+1  A: 

In DBGHELP.DLL, you can use the SymGetLineFromAddr64 function. You'll need to use P/Invoke. There might be a corresponding API in the DIA SDK, but I'm not as familiar with it as I am DBGHELP.

Roger Lipscombe
+3  A: 

You should look:

  • Mono.Cecil and especially the Mono.Cecil.Pdb module. It should do what you want and more.
madgnome