Where can I get SOS for Windows 10 IoT?

南楼画角 提交于 2019-12-30 09:00:26

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/32291110/where-can-i-get-sos-for-windows-10-iot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!