调试在64位环境中运行的32位应用程序 [英] Debugging 32 bit application running in 64 bit environment

查看:74
本文介绍了调试在64位环境中运行的32位应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在64位计算机上的wow64环境中运行的32位.Net 4.0应用程序.

I have a 32 bit .Net 4.0 application running in a wow64 environment in a 64 bit machine.

应用程序遇到错误,我使用C:\ Windows \ SysWOW64 \ taskmgr.exe中存在的32位taskmanager进行了转储

The application encountered an error and I took a dump with 32 bit taskmanager present in C:\Windows\SysWOW64\taskmgr.exe

我正在使用32位Windebugger分析此转储.我加载了以下dll.

I am using a 32 bit Windebugger to analyze this dump. I loaded the following dlls.

1).loadby sos CLR

1).loadby sos CLR

2).从客户端计算机加载mscordacwks.

2).load mscordacwks ( from the client machine).

但是我仍然无法使用SOS命令,例如!clrstack,!threads 等.

But still I am not able to use SOS commands like !clrstack,!threads etc.

我得到了错误:无法加载数据访问DLL,0x80004005

我做错了什么?

推荐答案

如果我不仅从客户端计算机上获取了mscordacwks.dll,还获得了sos.dll,则我得到了最好的结果.我什至没有那些文件的SxS问题,因此从默认的.NET Framework目录获取文件也无济于事.因此,我创建了 mscordacwks收集器,它将为您获取所有可能的文件.

I had the best results in case I didn't only get mscordacwks.dll but also sos.dll from the client machine. I even had SxS issues with those files, so getting the files from the default .NET framework directory was not helpful either. Therefore I created the mscordacwks collector which gets all possible files for you.

但是,您仍然需要找出要使用的版本.您可以先查看.NET Framework版本:

However, you still need to find out which version to use. You can start by looking at the .NET framework version:

lm vm clr; *** .NET CLR 4
lm vm mscorwks; *** .NET CLR 2
lm vm coreclr; *** Silverlight

(在最坏的情况下,您会加载两个不同版本的.NET,在这种情况下,

(In worst case, you have two different version of .NET loaded, in which case you are out of luck).

一旦知道确切的版本,就可以通过完整路径加载该版本的SOS

Once you know the exact version, you can load SOS of that version by full path

.load c:\mypath\SOS_AMD64_AMD64_4.0.30319.18444.dll

请注意,SOS.dll的收集版本也将被重命名以避免文件名冲突.为了更加方便,您可以创建一个副本,然后将其重命名为SOS.dll.

Note that the collected versions of SOS.dll will also be renamed to avoid file name conflicts. For more convenience, you can create a copy and just rename it to SOS.dll.

如果仍然存在任何mscordacwks.dll问题,则可以按照@lowleveldesign的建议进行操作.该工具应该已经适当地重命名了数据访问文件.如果发现任何错误,欢迎反馈.

If there are still any mscordacwks.dll issues, you can proceed as proposed by @lowleveldesign. The tool should already have renamed data access files appropriately. If you find any bug, feedback is welcome.

这篇关于调试在64位环境中运行的32位应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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