【发布时间】:2013-12-27 04:08:02
【问题描述】:
Dumping the contents of a dictionary object using Windbg and SOS.dll 在这个博客上,这个命令:
0:009> !dumpvc 000007fe984b57d8 000000018003ead8
他想查看数组中的一个元素, 这里元素类型是
System.Collections.Generic.Dictionary`2+Entry[[System.Guid, mscorlib],[Microsoft.TeamFoundation.Framework.Server.TeamFoundationPerformanceCounters, Microsoft.TeamFoundation.Framework.Server]]
从我的角度来看,我认为!dumpvc是用来探索值类型的,类型'Dictionary`2+Entry...'不是值类型。
出现这种情况的原因是什么?
我试过这个:转储一个字节数组。
0:000> !da -length 3 -nofields 00000001ba9f63b0
-nofields has no effect unless -details is specified
Name: System.Byte[]
MethodTable: 000007fee3a20b50
EEClass: 000007fee35a2330
Size: 148(0x94) bytes
Array: Rank 1, Number of elements 124, Type Byte
Element Methodtable: 000007fee3a1c168
[0] 00000001ba9f63c0
[1] 00000001ba9f63c1
[2] 00000001ba9f63c2
0:000> !do 00000001ba9f63c0
<Note: this object has an invalid CLASS field>
0:000> !dumpvc 000007fee3a1c168 00000001ba9f63c0
Name: System.Byte
MethodTable: 000007fee3a1c168
EEClass: 000007fee35a03b8
Size: 24(0x18) bytes
File: C:\Windows\Microsoft.Net\assembly\....\mscorlib.dll
Fields:
MT Field Offset Type VT Attr Value Name
000007fee3a1c168 4000276 0 System.Byte 1 instance 62 m_value
它显示了我预期的结果。 !dumpvc 可以在我调试的时候到处探索数组元素吗?
【问题讨论】: