0

我正在使用以下命令行启动 windbg:

C:\Program Files (x86)\Windows Kits\8.0\Debuggers\x64>windbg -i c:\tmp\Psscor4\amd64;c:\tmp\Psscor4\x86;c:\tmp;srv*E:\symbols*http://msdl.microsoft.com/download/symbols

C:\Program Files (x86)\Windows Kits\8.0\Debuggers\x64>

然后我加载一个内存崩溃转储并检查它从哪里加载 clr.dll:

Microsoft (R) Windows Debugger Version 6.2.9200.20512 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.


Loading Dump File [C:\tmp\Memory.dmp]
User Mini Dump File with Full Memory: Only application data is available

Comment: 'Dump created by DbgHost. First chance exception 0XE0434352'
Symbol search path is: c:\tmp\Psscor4\amd64;c:\tmp\Psscor4\x86;c:\tmp;srv*E:\symbols*http://msdl.microsoft.com/download/symbols
Executable search path is: c:\tmp\Psscor4\amd64;c:\tmp\Psscor4\x86;c:\tmp;srv*E:\symbols*http://msdl.microsoft.com/download/symbols
Windows 7 Version 7601 (Service Pack 1) MP (16 procs) Free x64
Product: Server, suite: Enterprise TerminalServer SingleUserTS
Built by: 6.1.7601.17965 (win7sp1_gdr.121004-0333)
Machine Name:
Debug session time: Mon Oct 14 13:45:55.000 2013 (UTC - 4:00)
System Uptime: not available
Process Uptime: 0 days 2:49:12.000
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
............................................................
Loading unloaded module list
..
This dump file has an exception of interest stored in it.
The stored exception information can be accessed via .ecxr.
(5768.5db4): CLR exception - code e0434352 (first/second chance not available)
KERNELBASE!RaiseException+0x39:
000007fe`fd33bccd 0000            add     byte ptr [rax],al ds:00000000`3af07bb2=00
0:122> lm vm clr
start             end                 module name
000007fe`f9a70000 000007fe`fa3ce000   clr        (deferred)             
    Image path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
    Image name: clr.dll
    Timestamp:        Mon Jul 09 00:10:25 2012 (4FFA59B1)
    CheckSum:         00959DDE
    ImageSize:        0095E000
    File version:     4.0.30319.17929
    Product version:  4.0.30319.17929
    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
0:122> ld clr
Symbols loaded for clr
0:122> lm vm clr
start             end                 module name
000007fe`f9a70000 000007fe`fa3ce000   clr        (pdb symbols)          e:\symbols\clr.pdb\D3D86782AEDD446F917F5D81FDFD3D252\clr.pdb
    Loaded symbol image file: clr.dll
    Mapped memory image file: c:\tmp\clr.dll
    Image path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
    Image name: clr.dll
    Timestamp:        Mon Jul 09 00:10:25 2012 (4FFA59B1)
    CheckSum:         00959DDE
    ImageSize:        0095E000
    File version:     4.0.30319.17929
    Product version:  4.0.30319.17929
    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
0:122> .exepath
Executable image search path is: c:\tmp\Psscor4\amd64;c:\tmp\Psscor4\x86;c:\tmp;srv*E:\symbols*http://msdl.microsoft.com/download/symbols
Expanded Executable image search path is: c:\tmp\psscor4\amd64;c:\tmp\psscor4\x86;c:\tmp;srv*e:\symbols*http://msdl.microsoft.com/download/symbols

所以,我的问题是为什么当图像路径和符号路径都指向另一个位置时, windbg 坚持从C:\Windows\Microsoft.NET\Framework64\v4.0.30319加载 clr.dll真的需要 - c:\tmp吗?

现在,当我强制加载符号时,我们可以看到:

Loaded symbol image file: clr.dll
Mapped memory image file: c:\tmp\clr.dll
Image path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Image name: clr.dll

我不喜欢它。我希望图像路径也来自c:\tmp

我该怎么做?

4

1 回答 1

1

Image 路径显示被调试者(被转储的进程)在哪里找到了 clr.dll。

不管你喜不喜欢,它注意到你可以做的:-)

于 2013-10-18T18:04:58.073 回答