我正在使用 Windbg 调试 ASP.NET Web 应用程序。
我正在按照这个过程打印表名:
!dumpheap -type System.Data.DataTable
!do 6bd27818 (DataTable MT)
as !ds .printf "%mu \n", c+
!ds 0bb93b44 (TableName)
我还是windbg的新手,有没有列出所有数据表表名的脚本?谢谢
.load C:\Program Files\DebugDiag\Exts\psscor2.dll
.foreach(entry {!dumpheap -type System.Data.DataTable -short}){.printf "%p: ", entry; du poi(${entry}+38)+c;.printf "\n"}
38 来自下面:
!do 数据表地址
65675184 40007b2 34 ...ropertyCollection 0 instance 00000000 extendedProperties
0daf0b24 40007b3 **38** System.String 0 instance 6bbd8de4 tableName