Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I get SOS for Windows 10 IoT?

I have a dump of a .NET Universal App running on Raspberry Pi 2, Windows 10 IoT:

0:000> vertarget
Windows 10 Version 10240 MP (4 procs) Free ARM (NT) Thumb-2
Product: WinNt, suite: SingleUserTS
Built by: 10.0.10240.16384 (th1.150709-1700)

I see it uses coreclr like Silverlight did before.

0:000> lm vm coreclr
start    end        module name
6e430000 6e7fd000   coreclr    (export symbols)       coreclr.dll
    Loaded symbol image file: coreclr.dll
    ...
    Timestamp:        Thu Jul 16 21:37:39 2015 (55A88693)
    ...
    File version:     4.6.23117.0
    Product version:  4.0.23117.0

Doing an !analyze -v does not download SOS automatically.

Loading the Silverlight version of SOS I found on my PC indicates the wrong version:

0:000> .load C:\Program Files\Microsoft Silverlight\5.1.20513.0\sos.dll

0:000> !threads
The version of SOS does not match the version of CLR you are debugging.  Please
load the matching version of SOS for the version of CLR you are debugging.
CLR Version: 4.6.23117.0
SOS Version: 5.1.20513.0
Failed to load data access DLL, 0x80004005
...

It seems that SOS was implemented on GitHub but I could not find a binary download.

On my PC with Visual Studio 2015 Community, I could find a file called mrt100sos.dll in the folder C:\Program Files\MSBuild\Microsoft\.NetNative\x86\ which turns out to be a debugging extension and says:

0:000> !help   
mrt100sos is a debugger extension DLL designed to aid in debugging .NET Native
programs.
...

which sounded great. But running any commands results in the following error message:

0:000> !threads
Failed to find runtime DLL (mrt100_app.dll), 0x80004005
Extension commands need mrt100_app.dll in order to have something to do.

I'm running out of ideas...

How do I debug a .NET universal app dump in a way that I can see the .NET callstack?, which IMHO results in the question Where can I get SOS for Windows 10 IoT?

like image 853
Thomas Weller Avatar asked Aug 29 '15 22:08

Thomas Weller


People also ask

Where can I find SOS DLL?

You can find it in C:\WINDOWS\Microsoft.NET\Framework\v4. 0.30319\sos. dll path. To get SOS automatically downloaded you need to have the Microsoft symbol servers set up in the _NT_SYMBOL_PATH environment variable.

How do I get my Windows IoT license?

In order to start your journey with Windows IoT Enterprise, you'll need to get a license. You can retrieve a license by contacting a Windows IoT Distributor or use the Windows Enterprise 90 day Evaluation.

Is Windows 10 IoT the same as Windows 10?

Windows 10 IoT Editions While only running a single app, it still has the manageability and security expected from Windows 10. By contrast, Windows 10 IoT Enterprise is a full version of Windows 10 with specialized features to create dedicated devices locked down to a specific set of applications and peripherals.


1 Answers

The CoreCLR can be hosted in the cross-platform .NET Execution Runtime (DNX).
Thus, if you install ASP.NET 5 or Visual Studio 2015, you should have DNX on this path:
%userprofile%\.dnx

Via DNVM install (included with DNX), you should be able to install the exact same version of CoreCLR, but currently this doesn't work for 1.0.23430.0 - what we have in UWP10.0.

Anyway, SOS at %userprofile%\.dnx\runtimes\dnx-coreclr-win-x86.1.0.0-rc1-update1\bin\sos.dll seems to work, even if there's a small version mismatch:

The version of SOS does not match the version of CLR you are debugging. Please load the matching version of SOS for the version of CLR you are debugging. CLR Version: 4.6.23430.0 SOS Version: 4.6.23516.1

like image 198
White hawk Avatar answered Sep 20 '22 01:09

White hawk