【问题标题】:Where can I get SOS for Windows 10 IoT?我在哪里可以获得适用于 Windows 10 IoT 的 SOS?
【发布时间】:2015-08-29 22:05:53
【问题描述】:

我有一个在 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)

我看到它使用 coreclr,就像 Silverlight 之前所做的那样。

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。

在我的 PC 上加载 SOS 的 Silverlight 版本表明版本错误:

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 社区的 PC 上,我可以在文件夹 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物联网?

【问题讨论】:

  • 这是一个非常好的问题。我去问问。
  • 我也通过 PowerShell 登录了 Raspberry,但 dir -s *sos.dll 没有透露任何信息。
  • 您甚至可以使用本机调试命令吗?我虽然 WinDbg 要求您在创建转储的同一平台上使用它 - 所以您需要一个 ARM 版本的 WinDbg。
  • mrt100_app.dll 是一个 .NET Native 运行时支持 dll。它被 Redmond 的 Store 服务器添加到包中。呵呵,怎么可能出问题?在将 .NET Native 应用程序部署到应用商店之前对其进行测试是必不可少的,这就是该项目可以选择的原因。
  • @vcsjones:此问题的副本已发布为an issue on Github。谢谢你的建议。希望我收到有关更改的通知,以便可以在此处提供答案。

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


【解决方案1】:

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

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

无论如何,%userprofile%\.dnx\runtimes\dnx-coreclr-win-x86.1.0.0-rc1-update1\bin\sos.dll 的 SOS 似乎可以工作,即使存在小版本不匹配:

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

【讨论】:

  • 我安装了 VS 2015,但没有 %userprofile%\.dnxfolder。安装程序不提供安装 DNX 的选项。有一个文件夹 C:\Program Files\Microsoft DNX\Dnvmdnvm install 1.0.23430.0 返回 HTTP 404(这可能是您用“不起作用”表示的)
  • dnvm install 1.0.0-rc1-update1 下载了一些东西。在我的电脑上C:\Program Files (x86)\Microsoft Web Tools\DNX\dnx-coreclr-win-x86.1.0.0-beta8\bin\sos.dll 中有一个 SOS.dll。我现在对mscordaccore_x86_arm_4.6.23117.00.dll 有一个 mscordacwks 类型的问题。不确定是否存在这样的跨平台 DLL - 我还没有看到 ARM 版本的 WinDbg。
猜你喜欢
  • 2020-04-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-03-28
  • 1970-01-01
  • 2011-11-19
  • 2015-08-03
相关资源
最近更新 更多