Die !da
funktionierte für das Beispiel, das ich schrieb, und es ist in this MSDN article genauso gemacht. Es ist jedoch überhaupt nicht praktisch, weil Sie nur eine Reihe von Adressen erhalten, die Sie dann in Schlüssel und Wert aufteilen müssen.
Es ist viel bequemer, !mdt
der sosex Erweiterung zu verwenden. Mit dem Argument -e:<depth>
wird es auf Schlüssel und Werte erweitert.
0:000> !mdt -e:2 025332a4
025332a4 (System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[DumpDictionaryInWinDbg.Program+A, DumpDictionaryInWinDbg]][], Elements: 3, ElementMT=001951b4)
[0] (System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[DumpDictionaryInWinDbg.Program+A, DumpDictionaryInWinDbg]]) VALTYPE (MT=001951b4, ADDR=025332ac)
hashCode:0x68d80062 (System.Int32)
next:0xffffffff (System.Int32)
key:0253316c (System.String) Length=4, String="keyA"
value:02533280 (DumpDictionaryInWinDbg.Program+A)
[1] (System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[DumpDictionaryInWinDbg.Program+A, DumpDictionaryInWinDbg]]) VALTYPE (MT=001951b4, ADDR=025332bc)
hashCode:0x5d730062 (System.Int32)
next:0xffffffff (System.Int32)
key:025331a0 (System.String) Length=4, String="keyB"
value:025332e0 (DumpDictionaryInWinDbg.Program+A)
[2] (System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[DumpDictionaryInWinDbg.Program+A, DumpDictionaryInWinDbg]]) VALTYPE (MT=001951b4, ADDR=025332cc)
hashCode:0x520e0062 (System.Int32)
next:0xffffffff (System.Int32)
key:025331d4 (System.String) Length=4, String="keyC"
value:025332ec (DumpDictionaryInWinDbg.Program+A)
Es funktioniert auch mit NetExt ‚s !wdict
, obwohl es nicht weiter die Werte gedruckt wird (es unterstützt DML, so dass Sie auf die Links klicken können):
0:004> !wdict 0228320C
Items : 3
[0]:==============================================(Physical Index: 1)
System.__Canon key = 022831a0 keyB
System.__Canon value = 022832e0
[1]:==============================================(Physical Index: 0)
System.__Canon key = 0228316c keyA
System.__Canon value = 02283280
[2]:==============================================(Physical Index: 2)
System.__Canon key = 022831d4 keyC
System.__Canon value = 022832ec
Die SDbgExt2 Erweiterung Ansprüche habe einen !DumpDictionary
Befehl, aber ich konnte ihn nicht benutzen.
Similary, PSSCOR4 hatte einen !dc
Befehl, aber es ist veraltet und schlägt für mich fehl (zumindest auf generische Wörterbücher in .NET 4.6).
Das '! Da' funktioniert für den Code, den ich geschrieben habe. Kannst du ein [mcve] posten? –