无法在 WinDbg 中加载 SOS [英] Unable to load SOS in WinDbg

查看:51
本文介绍了无法在 WinDbg 中加载 SOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

背景:我是 WinDbg 的新手,并试图让它第一次运行.我想检查从托管在 Windows Server 2008 (x86) 上的 IIS 7 中的正在运行的 ASP.NET 4 站点获取并下载到我的本地计算机的内存转储.

Background: I'm new to WinDbg and trying to get it running for the first time. I want to examine a memory dump I took from a running ASP.NET 4 site hosted in IIS 7 on Windows Server 2008 (x86) and downloaded to my local machine.

我安装了调试工具并首次启动了 WinDbg,打开故障转储.我去了文件|符号文件路径并将路径设置为 *srv*c:symbols*http://msdl.microsoft.com/download/symbols* 并等待所有符号加载.

I installed the debugging tools and launched WinDbg for the first time, opening the crash dump. I went to File | Symbol File Path and set the path to *srv*c:symbols*http://msdl.microsoft.com/download/symbols* and waited for all the symbols to load.

在尝试加载 SOS 时,我遇到了问题.首先,我尝试了以下命令...

When trying to load SOS, I ran into problems. First, I tried the following command...

.loadby sos mscorwks

...并收到响应无法找到模块mscorwks".

在网上搜索后,我尝试通过执行以下命令来加载 mscorwks...

After scouring the web, I tried to load mscorwks by executing the following command...

sxe ld mscorwks.dll
g

...并收到响应'g'中没有可运行的调试器错误"

...and received the response "No runnable debuggees error in 'g'"

我将 SOS.dll(从 C:WindowsMicrosoft.NETFrameworkv4.0.30319)复制到 WinDbg 目录中,然后尝试...

I copied SOS.dll (from C:WindowsMicrosoft.NETFrameworkv4.0.30319) into the WinDbg directory, then tried...

.load sos

...并收到错误...

...and received the error...

The call to LoadLibrary(sos) failed, Win32 error 0n193
    "%1 is not a valid Win32 application."
Please check your debugger configuration and/or network access.

我不太确定如何继续.我只想加载 SOS 并挖掘这个转储文件.任何帮助将不胜感激.

I'm not quite sure how to proceed. I just want to load SOS and dig around this dump file. Any help would be greatly appreciated.

仅供参考...我正在尝试使用 64 位版本的 Windbg 在 64 位版本的 Windows 7 上打开转储文件.

Fyi...I am trying to open the dump file on a 64-bit version of Windows 7 with the 64-bit version of Windbg.

推荐答案

CLR 运行时 dll 在 .NET 4 中重命名为 clr.dll.因此,为了加载正确版本的 SOS,您需要调整您的 .loadby 命令.即

The CLR runtime dll was renamed to clr.dll with .NET 4. So in order to load the correct version of SOS you need to adjust your .loadby command. I.e.

.loadby sos clr

此外,如果您使用的是 64 位,则应安装 32 位版本的 Windows 调试工具 以及调试 32 位应用程序.它们并排安装,因此在同一台机器上同时安装 32 位和 64 位版本没有问题.

Also, if you're on 64 bit, you should install the 32 bit version of Debugging Tools for Windows as well in order to debug 32 bit apps. They install side-by-side, so there's no problem in having both the 32 bit and the 64 bit version on the same machine.

我建议不要复制 SOS.dll.SOS 需要匹配框架的确切版本,因此只要您使用 .loadby 从框架目录中加载它,就大功告成了.

I would advice against copying SOS.dll. SOS needs to match the exact version of the framework, so as long as you load it from the framework directory using .loadby, you're all set.

这篇关于无法在 WinDbg 中加载 SOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆