Always Debug

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

公司使用的服务器装的是64位的2003系统,以32位的形式运行着iis6.

Title借助 Windows Server 2003TM Service Pack 1,IIS 6.0 可以在 64 位 Windows 上使用 Windows-32-on-Windows-64 (WOW64) 兼容层运行 32 位 Web 应用程序。IIS 6.0 使用 WOW64 是为了运行软件开发人员和管理员所需的 32 位个人产品应用程序,包括 32 位 Internet 信息服务 (IIS) Web 应用程序。具体的可参考Running 32-bit Applications on 64-bit Windows 

从任务管理器中看到w3wp.exe进程后面加上了*32标识,

而服务器上会同时存在x64和x86目录,

如果直接运行 

ntsd  -pv -p 5756 -logo d:\out.txt -lines -c ".dump /ma d:\testlocal.dmp;q"

来生成一个dump文件,则会直接调用x64目录内的ntsd,

这时取到的相关信息是wow64兼容层的,并非用户的32位程序,

用32位的windbg打开testlocal.dmp,看到的堆栈中会包含wow64相关内容,而非用户所想看的32位程序堆栈。

 

正确的方法是:

      产生64位程序的dump:

  • x64\userdump.exe
  • \Windows\System32\ntsd.exe
  • 64位WinDbg打开

      产生32位程序的dump:

  • x86\userdump.exe
  • \Windows\SysWOW64\ntsd.exe
  • 32位WinDbg打开

 

推荐用debugdiag工具来抓取dump文件。  

posted on 2009-06-08 15:03  dbgeng  阅读(1736)  评论(1编辑  收藏  举报