【问题标题】:force windbg not load symbol强制windbg不加载符号
【发布时间】:2016-12-25 03:14:56
【问题描述】:

我在做一些软件的crash分析,我确定sth.exe没有pdb文件,但是当sth.exe崩溃时,每次windbg都会搜索很多路径和符号服务器。即使我切断了vm的网络连接,它仍然固定了一段时间搜索sth.exe的pdb。这导致我的自动分析失败。有没有办法告诉windbg sth.exe没有pdb,请不要浪费时间搜索它?

【问题讨论】:

    标签: windbg symbols


    【解决方案1】:

    创建一个名为 symsrv.ini
    的文件 在windbg is installed
    所在的文件夹中 此示例中的目录是e:\ewdk\program files\windows kits\10\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) 的帖子,指出此功能是在 windbg 6.4.4 beta 中推出的

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

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

    【讨论】:

    • 哇,非常感谢~然后我在windbg帮助文件中找到它使用关键字“symsrv.ini”。我知道你是怎么知道的吗?我花了很长时间才找到它在帮助文件中,但一无所获。我错过了一些基本常识吗?
    • welli 无法在评论中做出回应,因此我为一些花絮编辑了帖子 tldr 这是一个极端情况,很难预测和计划它们,因此没有常识缺失
    猜你喜欢
    • 2012-06-14
    • 2018-01-08
    • 1970-01-01
    • 2015-01-02
    • 2015-02-18
    • 2011-11-06
    • 2017-03-14
    • 1970-01-01
    • 2020-07-19
    相关资源
    最近更新 更多