Dump-Array

Equivilent to !dumparray

Dumps the contents of an array in memory as a series of PSObjects representing each of the items in the array. The address of the array is provided as the parameter to the cmdlet.

In this example the backing array of a dictionary is examined: it contains a series of Dictionary<>.Entry's, each of which has a key and value field which can be piped to Dump-Object. See also Dump-Dictionary

PowerDbg > Dump-Array 000000000275eaa8

__Fields  : {System.Object, System.Object, System.Object, System.Object}
__Name    : System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[ManagedScenarios.ADataStructure, M
            anagedScenarios]]
__EEClass : 000007fee838fd38
__Size    : 40(0x28) bytes
hashCode  : 1463878807
next      : -1
key       : 000000000275d7f8
value     : 000000000275e948

__Fields  : {System.Object, System.Object, System.Object, System.Object}
__Name    : System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[ManagedScenarios.ADataStructure, M
            anagedScenarios]]
__EEClass : 000007fee838fd38
__Size    : 40(0x28) bytes
hashCode  : 1463878804
next      : 0
key       : 000000000275d820
value     : 000000000275e968

Last edited May 22, 2010 at 3:21 PM by piers7, version 1

Comments

No comments yet.