c# - 在哪里可以获得适用于 Windows 10 IoT 的 SOS?

标签 c# windbg sos windows-10-iot-core coreclr

我有一个在 Raspberry Pi 2、Windows 10 IoT 上运行的 .NET 通用应用程序转储:

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)

我看到它像 Silverlight 以前那样使用 coreclr

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

执行 !analyze -v 不会自动下载 SOS。

加载 Silverlight 版本的 SOS 我在我的 PC 上发现版本错误:

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
...

似乎SOS was implemented on GitHub但我找不到二进制下载。

在装有 Visual Studio 2015 Community 的电脑上,我可以在文件夹 C:\Program Files\MSBuild\Microsoft\.NetNative\x86\< 中找到一个名为 mrt100sos.dll 的文件 原来是一个调试扩展并说:

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

听起来不错。但是运行任何命令都会导致以下错误消息:

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.

我的想法已经用完了......

如何以可以看到 .NET 调用堆栈的方式调试 .NET 通用应用程序转储?,恕我直言,这会导致问题我在哪里可以获取 Windows 10 的 SOS物联网?

最佳答案

CoreCLR 可以托管在跨平台 .NET 执行运行时 (DNX) 中。
因此,如果您安装 ASP.NET 5 或 Visual Studio 2015,您应该在此路径上安装 DNX:
%userprofile%\.dnx

通过 DNVM 安装(包含在 DNX 中),您应该能够安装完全相同版本的 CoreCLR,但目前这不适用于 1.0.23430.0 - 我们在 UWP10 中拥有的版本。 0.

无论如何,位于 %userprofile%\.dnx\runtimes\dnx-coreclr-win-x86.1.0.0-rc1-update1\bin\sos.dll 的 SOS 似乎有效,即使有一个小的版本不匹配:

SOS 版本与您正在调试的 CLR 版本不匹配。请 为正在调试的 CLR 版本加载匹配的 SOS 版本。 CLR 版本:4.6.23430.0 SOS版本:4.6.23516.1

关于c# - 在哪里可以获得适用于 Windows 10 IoT 的 SOS?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32291110/

相关文章:

c# - 初始化时,它说 "Object reference not set to an instance of an object"

windbg - 在windbg 中有没有办法打印当前线程id 和frame id?

windbg - 如何在 64 位转储中引用 32 位整数数据

c# - 如何以匿名方式破解 WinDbg?

visual-studio-2010 - 用于 x64 调试的 SOS 扩展

c# - 如何访问我只需要在 Application.Start 上创建一次的变量

c# - 从支付网关重定向后丢失用户 cookie 和 session 数据

c# - 获取 ArgumentException : Invalid type parameter using ActionResult<JsonResult>> as a return type after upgrading to . NET Core 2.2

windows - <unclassified> 在 windbg !address 输出中是什么意思

debugging - WinDBG 查看传递给任何函数的参数