Windbg with SOS, How to dump a c# struct

时间秒杀一切 提交于 2019-12-21 12:18:10

问题


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


回答1:


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>


来源:https://stackoverflow.com/questions/3717292/windbg-with-sos-how-to-dump-a-c-sharp-struct

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!