要加载哪个版本的sos和clr/mscorwks.dll? [英] Which version of sos and clr/mscorwks.dll to load?

查看:303
本文介绍了要加载哪个版本的sos和clr/mscorwks.dll?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在64位计算机上托管了一个32位应用程序(面向.NET 3.5).我想分析此32位应用程序的内存转储.我使用32位adplus和cdb捕获了内存转储.我正在将内存转储加载到32位windbg中.当我将.net 2.0 sos.dll和.net 2.0 mscorwks.dll加载到windbg并执行!clrstack时,出现以下错误:未能找到运行时DLL(mscorwks.dll),0x80004005 扩展命令需要mscorwks.dll才能执行操作.我做错了什么?

I have a 32-bit application (targeting .NET 3.5) hosted on a 64-bit machine. I want to analyze the memory dump of this 32-bit application. I captured the memory dump using 32-bit adplus and cdb. I am loading the memory dump into 32-bit windbg. When I load .net 2.0 sos.dll and .net 2.0 mscorwks.dll into windbg and execute !clrstack, I get the following error: "Failed to find runtime DLL (mscorwks.dll), 0x80004005 Extension commands need mscorwks.dll in order to have something to do." What am I doing wrong?

评论中要求的信息

ADPlus命令行:

ADPlus command line:

adplus -hang -quiet -p 2440 -o C:\temp

WinDbg命令:

0:000> .load <fullpathto>\sos.dll

0:000> lmvm mscorwks
start    end        module name

0:000> .exr -1
ExceptionAddress: 00000000
   ExceptionCode: 80000007 (Wake debugger)
  ExceptionFlags: 00000000
NumberParameters: 0

推荐答案

转储指示未加载任何.NET 2.否则,lmvm mscorwks的输出应显示.NET运行时的详细信息,如下所示:

The dump indicates that no .NET 2 was loaded. Otherwise the output of lmvm mscorwks should show the details of the .NET runtime, like this:

0:003> lmvm mscorwks
start    end        module name
61bc0000 6216e000   mscorwks   (deferred)             
    Image path: C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
    ...
    File version:     2.0.50727.5485
    ...

您提到您是通过完整路径加载SOS的.如果转储是在您的计算机上进行的,则通常使用

You mentioned that you loaded SOS by full path. If the dump was taken on your machine, you would typically load it using

0:003> .loadby sos mscorwks    

在您的情况下,这应该已经提示您未加载.NET:

In your case, this should already give you the hint that .NET was not loaded:

Unable to find module 'mscorwks'

如果您不确定.NET版本,请尝试

If you're not so sure about the .NET version, try

.loadby sos clr; *** .NET 4
.loadby sos coreclr; *** Silverlight / Universal Apps

也许您在AdPlus命令行中输入错误,并指定了错误的进程ID.如果该PID意外存在,则转储错误.使用|检查进程名称

Maybe you had a typo in your AdPlus command line and specified the wrong process ID. If that PID accidentally exists, you got a wrong dump. Use | to check the process name

0:003> |
.  0    id: 1e78    attach  name: E:\...\NET2x32.exe

BTW:ADPlus的-quiet参数已过时,您可以忽略它.

BTW: The -quiet parameter of ADPlus is obsolete, you can omit it.

这篇关于要加载哪个版本的sos和clr/mscorwks.dll?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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