WinDbg符号文件加载
skyworth2010-07-02, 15:13 下午
pdb文件在d:\symcache根目录,但是始终无法加载,以下是windbg输出,为什么呢?
iptsvr.pdb\8439F7A3C92A4014BCFD948DE875CD531\iptsvr.pdb 这个尤其奇怪,符号文件在symcache目录下
0:034> .reload /f iptsvr.exe
SYMSRV: d:\symcache\iptsvr.pdb\8439F7A3C92A4014BCFD948DE875CD531\iptsvr.pdb not found
SYMSRV: http://msdl.microsoft.com/download/symbols/iptsvr.pdb/8439F7A3C92A4014BCFD948DE875CD531/iptsvr.pdb not found
DBGHELP: D:\WAYNE\bin\iptsvr.pdb - file not found
DBGHELP: d:\nchevron\pdbfiles\iptsvr.pdb - file not found
*** ERROR: Module load completed but symbols could not be loaded for D:\WAYNE\bin\iptsvr.exe
DBGHELP: iptsvr - no symbols loaded
0:034> .sympath
Symbol search path is: srv*
Expanded Symbol search path is: SRV*d:\symcache*http://msdl.microsoft.com/download/symbols
0:034> .sympath d:\symcache
DBGHELP: Symbol Search Path: d:\symcache
DBGHELP: Symbol Search Path: d:\symcache
Symbol search path is: d:\symcache
Expanded Symbol search path is: d:\symcache
0:034> .reload
Reloading current modules
................................................................
..................
DBGHELP: ntdll - public symbols
d:\symcache\ntdll.pdb\36515FB5D04345E491F672FA2E2878C02\ntdll.pdb
..
0:034> .reload /f iptsvr.exe
SYMSRV: d:\symcache\iptsvr.pdb\8439F7A3C92A4014BCFD948DE875CD531\iptsvr.pdb not found
DBGHELP: D:\WAYNE\bin\iptsvr.pdb - file not found
DBGHELP: d:\nchevron\pdbfiles\iptsvr.pdb - file not found
*** ERROR: Module load completed but symbols could not be loaded for D:\WAYNE\bin\iptsvr.exe
DBGHELP: iptsvr - no symbols loaded
Re: WinDbg符号文件加载
格蠹老雷2010-07-03, 09:51 上午
很正常啊。第一次执行.reload时,搜索的符号路径是:
SRV*d:\symcache*http://msdl.microsoft.com/download/symbols
下游符号库的路径是d:\symcache,因此WinDBG搜索这个目录时是按搜索下游符号库的方式来搜索的,即自动组件全路径:
xxx.pdb\guid+age\xxx.pdb
第二次.reload时,虽然把d:\symcache设置成了普通符号文件路径(使用.sympath),但是因为这个目录刚才做过下游符号库,其中留用标志文件(pingme.txt),所以WinDBG还是以下游符号库的方式来搜索这个目录。
建议把下游符号库和普通的符号文件目录分开,不要放在一起,以免混淆。有《软件调试》的朋友,可以读一下30.8节(特别是30.8.2)...