Analyzing a managed callstack from the compact framework

929 views Asked by At

I have a post-mortem kdmp generated by a C# .NET CF 3.5 application running on Windows Mobile 6.5 ARMV4I that I would like to analyze in WinDBG X86 6.12.0002.633.

I am able to get the unmanaged callstack, but that doesn't tell me much more than that I'm in a .net application.

In big windows, I would be able to use SOS to do a !clrstack, but mscorwks.dll isn't loaded by the CF.

17:362:armce> !clrstack
Failed to find runtime DLL (mscorwks.dll), 0x80004005
Extension commands need mscorwks.dll in order to have something to do.

What do I need to do to analyze a dump file generated by the compact framework?

Thanks, PaulH

1

There are 1 answers

1
Dinesh On

Check to make sure the following points:

1 - Load the SOS correctly for the correct version of framework

For 2.0 -> C:\windows\Microsoft.NET\Framework\v2.0.50727\sos.dll

For 4.0 -> C:\windows\Microsoft.NET\Framework\v4.0.30319\sos.dll

2 - Make sure that you use the correct version of sos loaded for the process whose dump is analysed.

For process using .net 4.0 load the sos.dll for the 4.0 framework and same applies to other framework(s).

So possible reason for the error you receive is you are not loading the correct sos.dll for the process being analysed.

Usually i will copy the SOS.dll to the debuggers directory and change the name as

SOS20.dll for .NET 2.0 version and SOS40.dll for .NET 4.0

Then load the dll in the debugger using

.load SOS20.dll when need to debug a process running on .NET 2.0 or load the other version(.load SOS40.dll).