.NET PDB文件的格式(架構)是什么?

[英]What is the format (schema) of .NET PDB files?

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.

.NET PDB文件的格式(架構)是什么?我想從這些文件中解析出信息,以便在調試應用程序中顯示正確的代碼行(行號)。

3 个解决方案


dbghelp library (straightforward):



DIA SDK (more comprehensive, but COM):

DIA SDK(更全面,但COM):


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.

我自己只用過dbghelp,只用於原生二進制文件。我發現它很容易使用,如果你需要做的就是將地址轉換為文件名和行號。不能說它是否適用於托管應用程序,但如果沒有,那么它看起來像DIA SDK。

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



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.



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

看看工具幫助/調試幫助API http://msdn.microsoft.com/en-us/magazine/cc301692.aspx?



粤ICP备14056181号  © 2014-2021 ITdaan.com