.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 个解决方案

#1


dbghelp library (straightforward):

dbghelp庫(直截了當):

http://msdn.microsoft.com/en-us/library/ms679309(VS.85).aspx

DIA SDK (more comprehensive, but COM):

DIA SDK(更全面,但COM):

http://msdn.microsoft.com/en-us/library/x93ctkx8(VS.80).aspx

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

至於PDB格式,引用DIA頁面,“因為后編譯器工具生成的.pdb文件的格式經歷了不斷修改,所以暴露格式是不切實際的”。就是這樣,我想......

#2


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.

正如我在這篇博文中解釋的那樣,CCI項目剛剛開源,社區首次擁有100%的托管框架來讀取PDB文件。

#3


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?


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2009/02/08/725399cac738b96f6422e1b4a67871ee.html



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