Why !dumpvc in windbg can dump out the array element?

Viewed 1883

Dumping the contents of a dictionary object using Windbg and SOS.dll On this blog, this command:

0:009> !dumpvc 000007fe984b57d8 000000018003ead8

He want to view an element in the array, Here the element type is

System.Collections.Generic.Dictionary`2+Entry[[System.Guid, mscorlib],[Microsoft.TeamFoundation.Framework.Server.TeamFoundationPerformanceCounters, Microsoft.TeamFoundation.Framework.Server]]

From my perspective, I think the !dumpvc is used to explore the value type, the type 'Dictionary`2+Entry...' is not a value type.

What is the reason for the situation?

I tried this: to dump a byte array.

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

It shows the result I expected. Can !dumpvc explore the array element in everywhere every time while I am debugging?

1 Answers
Related