.net 如何在Windbg中为64位服务器上运行的32位应用加载SOS
正在尝试使用调试器6.3.9600.16384 x86调试在64位Windows版本上运行的32位.NET应用程序的进程转储 花了几个小时寻找解决方案。在stackoverflow和其他网站上发现了许多主题,但是我无法解决这个问题。我正要把头发拔出来 已检查进程正在使用的.NET版本.net 如何在Windbg中为64位服务器上运行的32位应用加载SOS,.net,windbg,sos,.net,Windbg,Sos,正在尝试使用调试器6.3.9600.16384 x86调试在64位Windows版本上运行的32位.NET应用程序的进程转储 花了几个小时寻找解决方案。在stackoverflow和其他网站上发现了许多主题,但是我无法解决这个问题。我正要把头发拔出来 已检查进程正在使用的.NET版本 0:000> lmv m clr start end module name 618a0000 61f3b000 clr (pdb symbols) c
0:000> lmv m clr
start end module name
618a0000 61f3b000 clr (pdb symbols) c:\symcache\clr.pdb\5182A0CFB60D40DB90EEF44DEC7ACB932\clr.pdb
Loaded symbol image file: clr.dll
Mapped memory image file: c:\symcache\clr.dll\52717E8469b000\clr.dll
Image path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Image name: clr.dll
Timestamp: Wed Oct 30 22:47:48 2013 (52717E84)
CheckSum: 0069CCD3
ImageSize: 0069B000
File version: 4.0.30319.18444
Product version: 4.0.30319.18444
File flags: 8 (Mask 3F) Private
File OS: 4 Unknown Win32
File type: 2.0 Dll
File date: 00000000.00000000
Translations: 0000.04b0 0000.04e4 0409.04b0 0409.04e4
将clr.dll、mscordacwks.dll和SOS.dll从运行应用程序的服务器复制到C:\Temp\dll。将mscordacwks.dll重命名为mscordacwks_x86_x86_4.0.30319.18444.dll
0:000> .cordll -u -lp c:\temp\dlls -ve
CLRDLL: Unable to get version info for 'c:\temp\dlls\mscordacwks.dll', Win32 error 0n87
CLRDLL: Unable to get version info for 'c:\temp\dlls\SOS_x86_x86_4.0.30319.18444.dll', Win32 error 0n87
Cannot Automatically load SOS
CLRDLL: Loaded DLL c:\temp\dlls\mscordacwks_x86_x86_4.0.30319.18444.dll
CLR DLL status: Loaded DLL c:\temp\dlls\mscordacwks_x86_x86_4.0.30319.18444.dll
0:000> .loadby sos clr
0:000> !clrstack
Failed to load data access DLL, 0x80004005
Verify that 1) you have a recent build of the debugger (6.2.14 or newer)
2) the file mscordacwks.dll that matches your version of clr.dll is
in the version directory or on the symbol path
3) or, if you are debugging a dump file, verify that the file
mscordacwks_<arch>_<arch>_<version>.dll is on your symbol path.
4) you are debugging on supported cross platform architecture as
the dump file. For example, an ARM dump file must be debugged
on an X86 or an ARM machine; an AMD64 dump file must be
debugged on an AMD64 machine.
You can also run the debugger command .cordll to control the debugger's
load of mscordacwks.dll. .cordll -ve -u -l will do a verbose reload.
If that succeeds, the SOS command should work on retry.
If you are debugging a minidump, you need to make sure that your executable
path is pointing to clr.dll as well.
0:000>.cordell-u-lpc:\temp\dlls-ve
CLRDLL:无法获取“c:\temp\dlls\mscordacwks.dll”的版本信息,Win32错误0n87
CLRDLL:无法获取“c:\temp\dlls\SOS\u x86\u x86\u 4.0.30319.18444.dll”的版本信息,Win32错误0n87
无法自动加载SOS
CLRDLL:加载的DLL c:\temp\dlls\mscordacwks_x86_x86_4.0.30319.18444.DLL
CLR DLL状态:加载的DLL c:\temp\dlls\mscordacwks\u x86\u x86\u 4.0.30319.18444.DLL
0:000>.loadby sos clr
0:000> !clrstack
无法加载数据访问DLL,0x80004005
验证1)您是否拥有调试器的最新版本(6.2.14或更新版本)
2) 与您的clr.dll版本匹配的文件mscordacwks.dll是
在版本目录或符号路径上
3) 或者,如果正在调试转储文件,请验证该文件
mscordacwks______.dll位于符号路径上。
4) 您正在受支持的跨平台体系结构上进行调试
转储文件。例如,必须调试ARM转储文件
在X86或ARM机器上;必须创建AMD64转储文件
在AMD64机器上调试。
您还可以运行调试器命令.cordl来控制调试器的
加载mscordacwks.dll。Cordell-ve-u-l将执行详细的重新加载。
如果成功,SOS命令应在重试时工作。
如果您正在调试小型转储,则需要确保您的可执行文件
路径也指向clr.dll。
已尝试设置可执行路径
0:000> .exepath c:\temp\dlls
Executable image search path is: c:\temp\dlls
Expanded Executable image search path is: c:\temp\dlls
************* Symbol Path validation summary **************
Response Time (ms) Location
OK c:\temp\dlls
0:000> .reload
................................................................
..........................................................
Loading unloaded module list
.....
0:000> !clrstack
Failed to load data access DLL, 0x80004005
Verify that 1) you have a recent build of the debugger (6.2.14 or newer)
2) the file mscordacwks.dll that matches your version of clr.dll is
in the version directory or on the symbol path
3) or, if you are debugging a dump file, verify that the file
mscordacwks_<arch>_<arch>_<version>.dll is on your symbol path.
4) you are debugging on supported cross platform architecture as
the dump file. For example, an ARM dump file must be debugged
on an X86 or an ARM machine; an AMD64 dump file must be
debugged on an AMD64 machine.
You can also run the debugger command .cordll to control the debugger's
load of mscordacwks.dll. .cordll -ve -u -l will do a verbose reload.
If that succeeds, the SOS command should work on retry.
If you are debugging a minidump, you need to make sure that your executable
path is pointing to clr.dll as well.
0:000>.exepath c:\temp\dll
可执行图像搜索路径为:c:\temp\dlls
扩展的可执行映像搜索路径为:c:\temp\dlls
*************符号路径验证摘要**************
响应时间(ms)位置
确定c:\temp\dll
0:000>。重新加载
................................................................
..........................................................
加载卸载模块列表
.....
0:000> !clrstack
无法加载数据访问DLL,0x80004005
验证1)您是否拥有调试器的最新版本(6.2.14或更新版本)
2) 与您的clr.dll版本匹配的文件mscordacwks.dll是
在版本目录或符号路径上
3) 或者,如果正在调试转储文件,请验证该文件
mscordacwks______.dll位于符号路径上。
4) 您正在受支持的跨平台体系结构上进行调试
转储文件。例如,必须调试ARM转储文件
在X86或ARM机器上;必须创建AMD64转储文件
在AMD64机器上调试。
您还可以运行调试器命令.cordl来控制调试器的
加载mscordacwks.dll。Cordell-ve-u-l将执行详细的重新加载。
如果成功,SOS命令应在重试时工作。
如果您正在调试小型转储,则需要确保您的可执行文件
路径也指向clr.dll。
已尝试。由sos clr加载
0:000> .loadby sos clr
0:000> !clrstack
Failed to load data access DLL, 0x80004005
Verify that 1) you have a recent build of the debugger (6.2.14 or newer)
2) the file mscordacwks.dll that matches your version of clr.dll is
in the version directory or on the symbol path
3) or, if you are debugging a dump file, verify that the file
mscordacwks_<arch>_<arch>_<version>.dll is on your symbol path.
4) you are debugging on supported cross platform architecture as
the dump file. For example, an ARM dump file must be debugged
on an X86 or an ARM machine; an AMD64 dump file must be
debugged on an AMD64 machine.
You can also run the debugger command .cordll to control the debugger's
load of mscordacwks.dll. .cordll -ve -u -l will do a verbose reload.
If that succeeds, the SOS command should work on retry.
If you are debugging a minidump, you need to make sure that your executable
path is pointing to clr.dll as well.
0:000>.loadby sos clr
0:000> !clrstack
无法加载数据访问DLL,0x80004005
验证1)您是否拥有调试器的最新版本(6.2.14或更新版本)
2) 与您的clr.dll版本匹配的文件mscordacwks.dll是
在版本目录或符号路径上
3) 或者,如果正在调试转储文件,请验证该文件
mscordacwks______.dll位于符号路径上。
4) 您正在受支持的跨平台体系结构上进行调试
转储文件。例如,必须调试ARM转储文件
在X86或ARM机器上;必须创建AMD64转储文件
在AMD64机器上调试。
您还可以运行调试器命令.cordl来控制调试器的
加载mscordacwks.dll。Cordell-ve-u-l将执行详细的重新加载。
如果成功,SOS命令应在重试时工作。
如果您正在调试小型转储,则需要确保您的可执行文件
路径也指向clr.dll。
谁能帮我?不知道我还能尝试什么。您是如何创建转储文件的? 如果要在64位windows上调试32位进程,则必须使用位于的32位版本的任务管理器 C:\Windows\SysWOW64\taskmgr.exe 然后继续右键单击进程并“创建转储文件”
获取正确的转储文件后,请在获取转储文件的计算机上的WinDbg(X64)中打开它-也就是说,如果可能的话,请在远程PC上安装WinDbg,因为这样可以减少调试问题。如果您有不同版本的.NET framework(甚至是细微的版本),那么您已经做了很多正确的事情:
.cordell
,并加载了正确的mscordacwks DLL.loadby sos clr
此命令将从clr.dll
所在的相同位置加载SOS。这将在您的PC上确定,因此这可能会加载与转储中不同版本的SOS
相反,请提供从PC收集的SOS的完整路径:
.load c:\temp\dlls\sos.dll
试试@RemusRusanu编辑的帖子。尝试