32位程序导出dump
32位程序需要用32位的任务管理器导出。
C:\Windows\SysWOW64\Taskmgr.exe
64位程序导出dump
任务管理器导出dump文件
!threadpool
线程池情况
!threadpool
CPU utilization: 13%
Worker Thread: Total: 7 Running: 0 Idle: 4 MaxLimit: 8191 MinLimit: 4
Work Request in Queue: 0
--------------------------------------
Number of Timers: 2
--------------------------------------
Completion Port Thread:Total: 1 Free: 1 MaxFree: 8 CurrentLimit: 1 MaxLimit: 1000 MinLimit: 4
0:000> !threadpool
CPU utilization: 13%
Worker Thread: Total: 7 Running: 0 Idle: 4 MaxLimit: 8191 MinLimit: 4
Work Request in Queue: 0
--------------------------------------
Number of Timers: 2
--------------------------------------
Completion Port Thread:Total: 1 Free: 1 MaxFree: 8 CurrentLimit: 1 MaxLimit: 1000 MinLimit: 4
!runaway
显示当前进程的所有线程用户态时间信息
!runaway
!clrstack
显示调用栈
!clrstack
!threads
查看线程
!threads
## 查看特殊线程
!threads -special
kb
打印出调用的堆栈
kb
~ns
切换线程ID为n的线程为当前调试线程
~20s
加载对应的SOS.DLL
## 32位加载32位的sos.dll
.load C:\Windows\Microsoft.NET\Framework\v4.0.30319\sos.dll
## 64位加载64位的sos.dll
.load C:\Windows\Microsoft.NET\Framework64\v4.0.30319\sos.dll
!dso
!do 00000002838d92c8
!dumpheap -stat
检查当前所有托管类型的统计信息
!dumpheap -stat
!dumpheap -mt address
!dumpheap -mt 00007ffd5c24a068
!analyze -v