6

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.

SamB
  • 9,039
  • 5
  • 49
  • 56
Aaron Jensen
  • 6,030
  • 1
  • 30
  • 40

2 Answers2

3

You should look:

  • Mono.Cecil and especially the Mono.Cecil.Pdb module. It should do what you want and more.
Julien Hoarau
  • 48,964
  • 20
  • 128
  • 117
2

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
  • 89,048
  • 55
  • 235
  • 380