2012-08-24 78 views
2

我正在使用Windbg調試ASP.NET Web應用程序。在Windbg中打印所有數據表的所有tableName

我下面這個過程中打印的表名:

!dumpheap -type System.Data.DataTable 
!do 6bd27818 (DataTable MT) 
as !ds .printf "%mu \n", c+ 
!ds 0bb93b44 (TableName) 

我還是到WinDbg的新手,是否有一個腳本列出所有數據表的表名? 感謝

回答

1

解決這得益於http://www.infinitec.de/post/2011/08/15/Windbg-Finding-a-specific-instance-of-a-managed-object-in-a-windows-process.aspx

.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從下方來了!

做DatatableAddress

65675184 40007b2  34 ...ropertyCollection 0 instance 00000000 extendedProperties 
0daf0b24 40007b3  **38**  System.String 0 instance 6bbd8de4 tableName