Cannot .loadby sos mscorwks or .loadby sos clr(无法按SOS命令加载或按SOS CLR加载)
问题描述
我有一个.NET.86应用程序。我正在尝试从CDB运行dumpdomain
,但不断收到错误。
关于这一点有很多问题,我尝试了几种变体:
C:Usersd.banksDocuments>cdb DoNothingx86.exe
Microsoft (R) Windows Debugger Version 10.0.17134.12 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.
CommandLine: DoNothingx86.exe
************* Path validation summary **************
Response Time (ms) Location
Deferred srv*C:SymbolsMicrosoft
*http://msdl.microsoft.com/download/symbols
Symbol search path is: srv*C:SymbolsMicrosoft
*http://msdl.microsoft.com/download/symbols
Executable search path is:
ModLoad: 00000000`002d0000 00000000`002d8000 image00000000`002d0000
ModLoad: 00007ff8`4f790000 00007ff8`4f960000 ntdll.dll
ModLoad: 00000000`77af0000 00000000`77c73000 ntdll.dll
ModLoad: 00000000`6dda0000 00000000`6ddf2000 C:WINDOWSSystem32wow64.dll
ModLoad: 00000000`6de10000 00000000`6de87000 C:WINDOWSSystem32wow64win.dll
(3e64.e4c): Break instruction exception - code 80000003 (first chance)
ntdll!LdrpDoDebuggerBreak+0x30:
00007ff8`4f862cc0 cc int 3
0:000> .loadby sos.dll mscorwks
Unable to find module 'mscorwks'
0:000> .loadby sos mscorwks
Unable to find module 'mscorwks'
0:000> .loadby C:WindowsMicrosoft.NETFrameworkv4.0.30319SOS.dll mscorwks
Unable to find module 'mscorwks'
0:000> .loadby sos.dll clr
Unable to find module 'clr'
0:000> .loadby sos clr
Unable to find module 'clr'
0:000> .loadby C:WindowsMicrosoft.NETFrameworkv4.0.30319SOS.dll clr
Unable to find module 'clr'
0:000> .load C:WindowsMicrosoft.NETFrameworkv4.0.30319SOS.dll
The call to LoadLibrary(C:WindowsMicrosoft.NETFrameworkv4.0.30319SOS.dll) failed, Win32 error 0n193
"%1 is not a valid Win32 application."
Please check your debugger configuration and/or network access.
0:000> .load C:WindowsMicrosoft.NETFrameworkv4.0.30319SOS.dll clr
The call to LoadLibrary(C:WindowsMicrosoft.NETFrameworkv4.0.30319SOS.dll clr) failed, Win32 error 0n126
"The specified module could not be found."
Please check your debugger configuration and/or network access.
我已尝试使用x86调试器:
Microsoft (R) Windows Debugger Version 10.0.17134.12 X86
Copyright (c) Microsoft Corporation. All rights reserved.
CommandLine: DoNothingx86.exe
************* Path validation summary **************
Response Time (ms) Location
Deferred srv*C:SymbolsMicrosoft
*http://msdl.microsoft.com/download/symbols
Symbol search path is: srv*C:SymbolsMicrosoft
*http://msdl.microsoft.com/download/symbols
Executable search path is:
ModLoad: 00930000 00938000 image00930000
ModLoad: 77af0000 77c73000 ntdll.dll
ModLoad: 77900000 779e0000 WOW64_IMAGE_SECTION
ModLoad: 733c0000 73419000 C:WINDOWSSysWOW64MSCOREE.DLL
ModLoad: 77900000 779e0000 C:WINDOWSSysWOW64KERNEL32.dll
ModLoad: 76a00000 76ba2000 C:WINDOWSSysWOW64KERNELBASE.dll
(1e98.2bb0): Break instruction exception - code 80000003 (first chance)
*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll -
eax=00000000 ebx=00000000 ecx=327c0000 edx=00000000 esi=00f326e8 edi=00bd7000
eip=77b96d5c esp=00cff2e4 ebp=00cff310 iopl=0 nv up ei pl zr na pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000246
ntdll!LdrInitShimEngineDynamic+0x71c:
77b96d5c cc int 3
0:000> .loadby sos.dll mscorwks
Unable to find module 'mscorwks'
0:000> .loadby sos.dll clr
Unable to find module 'clr'
0:000> .loadby sos mscorwks
Unable to find module 'mscorwks'
0:000> .loadby sos clr
Unable to find module 'clr'
推荐答案
发件人
ModLoad: 00000000`6dda0000 00000000`6ddf2000 C:WINDOWSSystem32wow64.dll
我们可以看到这是一个32位进程,因此您需要32位SOS。32位SOS仅适用于32位WinDbg。
要加载扩展,有两个命令。一个是.loadby
,另一个是.load
。对于.loadby
使用相对路径,对于.load
使用完整路径。
对于.loadby
,有5个选项:
.loadby sos mscorsvr
.loadby sos mscorwks
.loadby sos clr
.loadby sos coreclr
.loadby sos <somethingelse>
其中mscorsvr
真的很旧(.NET CLR 1,服务器版本),mscorwks
很旧(.NET CLR 1和2,但仍然存在),clr
在今天很常见(.NET CLR 4),coreclr
可能在增加(UWP和Silverlight),<somethingelse>
很烦人(查看lm
,发现看起来相似但附加了数字的东西)。
主要问题是,您试图在.NET运行时尚未加载时加载SOS。等待.NET加载后,该命令才会起作用。在初始断点处肯定是不可能的。
使用
sxe ld clr
sxe ld mscorwks
sxe ld coreclr
g
让应用程序运行,直到.NET可用
这篇关于无法按SOS命令加载或按SOS CLR加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:无法按SOS命令加载或按SOS CLR加载
基础教程推荐
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30
- SSE 浮点算术是否可重现? 2022-01-01
- rabbitmq 的 REST API 2022-01-01
- 如何激活MC67中的红灯 2022-01-01
- MS Visual Studio .NET 的替代品 2022-01-01
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- c# Math.Sqrt 实现 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- 将 XML 转换为通用列表 2022-01-01