Friday, August 26, 2011

Typical windbg commands

Recently I debugged a lot .NET code in a native debugger. Some useful commands are listed below.

.load sos
.loadby sos mscorwks

SOS commands

!eeheap -gc
!dumpstackobjects (!dso)
!dumpheap -stat - All classes in a memory
!dumpheap -mt message_table - First column
!dumpheap -stat - list of object for a given class
!do adress - Address of a command listed above
!gcroot adress - why it is not garbage collected
~* e clrstack - For all threats run command clrstack
!syncblk - Show all locks