【问题标题】:dump of 32bit-process running on windows2003 enterprise x64 sp2在 Windows 2003 Enterprise x64 sp2 上运行的 32 位进程转储
【发布时间】:2026-01-05 17:15:01
【问题描述】:

我尝试用 Windbg 分析这个转储。但它不能显示 x86 调用堆栈。 符号路径配置为:

srv*D:\dev_head\win_symbols*

一些命令结果:

0:000> !teb
Wow64 TEB32 at 000000007efdd000
*************************************************************************
***                                                                   ***
***                                                                   ***
***    Your debugger is not using the correct symbols                 ***
***                                                                   ***
***    In order for this command to work properly, your symbol path   ***
***    must point to .pdb files that have full type information.      ***
***                                                                   ***
***    Certain .pdb files (such as the public OS symbols) do not      ***
***    contain the required information.  Contact the group that      ***
***    provided you with these symbols if you need this command to    ***
***    work.                                                          ***
***                                                                   ***
***    Type referenced: wow64!_TEB32                                  ***
***                                                                   ***
*************************************************************************
error InitTypeRead( wow64!_TEB32 )...
Wow64 TEB at 000000007efdb000
ExceptionList:        000000007efdd000
StackBase:            000000000016fcfc
StackLimit:           000000000016b000
SubSystemTib:         0000000000000000
FiberData:            0000000000001e00
ArbitraryUserPointer: 0000000000230bf0
Self:                 000000007efdb000
EnvironmentPointer:   0000000000000000
ClientId:             00000000000007e0 . 0000000000000ecc
RpcHandle:            0000000000000000
Tls Storage:          0000000000000000
PEB Address:          000000007efdf000
LastErrorValue:       0
LastStatusValue:      0
Count Owned Locks:    0
HardErrorMode:        0


0:000> !load wow64exts
0:000> !sw
The current thread doesn't have an x86 context.

符号文件wow64.pdb,wow64win.pdb可以正确下载/加载,但只有wow64cpu.pdb无法下载。这个问题会导致分析失败吗?

【问题讨论】:

    标签: windows 32bit-64bit dump


    【解决方案1】:

    通常您需要同时配置 Microsoft 的符号服务器和下游(本地)缓存位置。

    在本地网络中使用 Samba/CIFS 服务器的示例(您必须能够写入):

    symsrv*symsrv.dll*\\sambasrv\symbols*http://msdl.microsoft.com/download/symbols
    

    ... 或者是磁盘位置:

    symsrv*symsrv.dll*C:\Windows\Symbols*http://msdl.microsoft.com/download/symbols
    

    在WinDbg中使用.symfix将MS符号服务器设置为默认值,然后.reload重新加载所有符号信息。

    配置一个名为_NT_SYMBOL_PATH的全局环境变量很常见:

    setx /s _NT_SYMBOL_PATH=symsrv*symsrv.dll*\\sambasrv\symbols*http://msdl.microsoft.com/download/symbols
    

    (以上为批处理/NT脚本语法...咨询setx /?

    如果您像我一样使用各种不同的命令行创建快捷方式(例如调试 VM),还请查看 WinDbg 的命令行开关 -y

    【讨论】:

      【解决方案2】:

      我假设您有一个完整的转储而不是一个小的内存转储文件。 WOW64CPU 程序数据库应为 download 和符号包库。

      使用以下标志强制加载特定 pdb:(但请注意,由于不匹配,调试结果可能在多个点上是错误的)

      .reload /f [name] /i
      

      其他开发者也报告了类似的问题。 见“Unable to get the symbols file for wow64cpu.dll from 64-bit Windows 2003 Server SP2

      • 您是否运行 x86 版本的 WinDBG?

      您也可以考虑在 VirtualBox 或 VMWare 中运行另一个 Windows 版本。

      另见

      How to read the small memory dump files that Windows creates for debugging

      【讨论】:

      • “无法从 64 位 Windows 2003 Server SP2 获取 wow64cpu.dll 的符号文件”我注意到了这个问题。
      • 我下载了WindowsServer2003-KB933548-v1-x64-symbols-NRL-ENU,发现里面有wow64win.pdb,但是没有wow64cpu.pdb。是微软的错误?? @_@ 我确实使用 x86 版本的 WinDBG...
      最近更新 更多