sthiers
sthiers

Reputation: 3531

How to read source path from pdb

How can you read the source paths used to compile a pdb in .NET (C#) environment?

Upvotes: 4

Views: 2074

Answers (1)

Yahia
Yahia

Reputation: 70369

The PDB format is NOT documented - but there is an API from MS called DIA which provides several methods to deal PDB. It is COM-based... for details see MSDN. PDB files usually contain filenames and linenumbers BUT I am not sure that they always contains full path to the source.

Some interesting information on PDBs can be found here.

IF you want some .NET source code dealing with .PDBs see Mono.Cecil and esp. the namespace Mono.Cecil.Pdb .

2/12/16 update

Microsoft has been open-sourcing the PDB format. Information can be found in their github repo here.

Upvotes: 4

Related Questions