How to read source path from pdb

我只是一个虾纸丫 提交于 2020-01-11 10:26:10

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/9585192/how-to-read-source-path-from-pdb

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!