Last active
April 20, 2018 15:04
-
-
Save vchekan/5513176 to your computer and use it in GitHub Desktop.
Windbg for clr cheatsheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### making a memory dump | |
adplus.exe -hang -iis -o c:\dumps | |
Symbol search path: srv*c:\symbols*http://msdl.microsoft.com/download/symbols | |
.loadby sos clr | |
!threads | |
!threadpool | |
~* e !clrstack ### show all clr stacks | |
.cls ### clear screen | |
Find all instances of type DefaultServerPool (substring matching) | |
!dumpheap -type DefaultServerPool | |
### heap investigation | |
!heapstat ### which heap (genX or LOH) consumes space | |
!dumpheap -stat ### which type takes memory | |
!dumpheap -stat -min 85000 ### which type takes memory in LOH | |
!dumpheap -mt 000007fef8f8adf8 -min 85000 ### get address of instances of a type | |
!gcroot 0000000167590068 ### who owns (and prevents GC-ing) given object | |
### foreach loop | |
.foreach ($addr {!dumpheap -short -mt 000007fef8faf650 }) {!do $addr} | |
# !do field at offset 0xNN | |
.foreach ($addr {!dumpheap -short -mt 000007fef8faf650 }) {!do poi(${$addr}+0x8)} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment