强制 windbg 不加载符号

force windbg not load symbol

我正在对某些软件进行崩溃分析,我确定没有可以为 sth.exe 获取的 pdb 文件,但是当 sth.exe 崩溃时,每次 windbg 都会搜索很多路径和符号 servers.Even 当我切断虚拟机的网络连接时,它仍然固定了一段时间来搜索 sth.exe 的 pdb.And 这导致我的自动分析失败.有没有办法告诉windbg sth.exe 没有pdb,请不要浪费时间搜索它?

创建一个名为 symsrv.ini
的文件 在 windbg is installed
所在的文件夹中 此示例中的目录是 e:\ewdk\program files\windows kits\Debuggers\x86

在文件中创建排除部分
并将所有未知的 pdb 列表添加到其中
symsrv 不会去搜索它们

:\>ls -l symsrv.ini
-rw-rw-rw-  1 HP 0 259 2016-08-18 17:43 symsrv.ini

:\>file symsrv.ini
symsrv.ini; ASCII text, with CRLF line terminators

:\>cat symsrv.ini
[exclusions]
livekdD.sys
vmm.pdb
livekdD.pdb
vmci.pdb
vsock.pdb
clwvd.pdb
spldr.pdb
vmkbd.pdb
vmnetsrv.pdb
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

:\>livekd

LiveKd v5.40 - Execute kd/windbg on a live system
Sysinternals - www.sysinternals.com

!sym noisy
noisy mode - symbol prompts off

kd> .reload /f

SYMSRV:  vmci.pdb is in the file exclusion list
DBGHELP: d:\build\ob\bora-1141980\bora-vmsoft\build\release\crosstalk\windows\wi
n2k\i386\vmci.pdb - file not found
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for vmci.sys -
DBGHELP: vmci - export symbols

SYMSRV:  vsock.pdb is in the file exclusion list
DBGHELP: d:\build\ob\bora-1253991\bora-vmsoft\build\release\vsock\windows\win2k\
i386\vsock.pdb - file not found
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for vsock.sys -
DBGHELP: vsock - export symbols

SYMSRV:  vmm.pdb is in the file exclusion list
DBGHELP: m:\src\built\vs2005.sp2\vssp2\usa\ent_volume\i386\sym\sys\vmm.pdb - fil
e not found
*** ERROR: Module load completed but symbols could not be loaded for vmm.sys
DBGHELP: vmm - no symbols loaded

************* Symbol Loading Error Summary **************
Module name            Error
vmci                   The system cannot find the file specified : srv*e:\symbols*
                       http://msdl.microsoft.com/download/symbols The SYMSRV client 
                       failed to find a file in the UNC store, or there is an invalid
                       UNC store (an invalid path or thepingme.txt file is not present
                       in the root directory), or the fileis present 
                       in the symbol server exclusion list.

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

回复评论

首先,windbg 帮助中有一个设置排除列表主题

这个主题提到了这个文件(文件是关于使用 symproxy 的,应该在 %windowsdir\system32\inetsrv\" 上创建并且不适用于 symsrv.dll(注册表项也似乎不起作用 )

https://msdn.microsoft.com/en-us/library/windows/hardware/ff556870(v=vs.85).aspx

对我来说,我在 procmon 中看到一个失败,在 windbg 安装目录的 fastio 路径中出现 NameNotFound 错误
所以凭直觉我将文件从上述路径移动到 windbg 安装目录
事情似乎在很久以前就可以正常工作

但随后我在 osr windbg 列表中看到来自 jason shay (MSFT) 的 post 说明此功能已在 windbg 6.4.4 beta

中推出

http://www.osronline.com/showthread.cfm?link=68916

所以没有任何常识缺失只是角落案例总是很难找到