How to list call stack of all managed threads using WinDBG?
Asked Answered
M

3

38

I have a dump created from a managed application. I am using SOS/SOSEX extentions to ease my dump analysis. I'd like to list down the call stack of all managed threads as we do ~*kb with native applications. How do we do that?

Mario answered 16/11, 2011 at 10:25 Comment(0)
S
54

Use the !EEStack command:

0:007> .load sos
0:007> !EEStack

See SOS.dll (SOS Debugging Extension)

Silvan answered 16/11, 2011 at 11:14 Comment(4)
.loadby sos clr is better (for .NET 4) or .loadby sos mscorwksJacqui
For .net 4 i downloaded the .net 4 version of sos, Psscor4 microsoft.com/en-gb/download/details.aspx?id=21255, place the dll into the windbg folder - matching the correct dll with the correct windbg version (32bit|64bit) then to load .load Psscor4.dllMissing
@Mario see JasonE's answerToot
!EEStack -shortBrownout
F
39

This command will dump all managed threads

~*e!dumpstack
Flatten answered 17/9, 2012 at 20:50 Comment(2)
Note that this requires the appropriate debugging extension to be loaded first via .loadby sos clrBeebeebe
Or ~*e!clrstackZalucki
T
15

with sosex, use ~*e!mk (~ - thread, * - all, e - execute this command, !mk - display managed stack. Most of the commands in sosex mirror the native command, but have the m (managed) in front of them.

Tallyho answered 13/12, 2011 at 12:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.