Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windbg with SOS, How to dump a c# struct

How do I dump a struct using windbg, is there a dumpstruct command similar to dumpobject? Or can dumpobject dump structs aswell?

like image 954
MatteS Avatar asked Sep 15 '10 11:09

MatteS


1 Answers

Yes, you could use the !dumpvc command.
Since structs don't have an object header, the debugger doesn't know its type, so you will have to pass it the struct's MethodTable address.

>!DumpVC <METHOD_TABLE_ADDRESS> <OBJECT_ADDRESS>
like image 153
Liran Avatar answered Oct 11 '22 17:10

Liran