how can i set windbg to automatically download all the symbols?

戏子无情 提交于 2019-12-03 09:04:18

I think you're looking for the article Building a Debugging Environment

Basically it downloads symbols for all files you have currently installed. I did that two months ago for a Windows 7 installation and it worked fine - but it took 8.3 GB of disk space and of course a long time to download.

The concept is to go through all DLLs and EXEs in the Windows directory, add the file to a local symbol store and then check for symbols online.

SET PATH=%PATH%;"C:\Program Files\Debugging Tools for Windows"
REM Copy all .DLL files
SYMSTORE add /r /f C:\Windows\*.dll /s C:\SymbolStore\OSSymbols /t "Microsoft Windows" /v ""
REM Download symbols for .DLL files
SYMCHK /r C:\Windows\*.dll /s SRV*C:\SymbolStore\OSSymbols*http://msdl.microsoft.com/download/symbols
REM Copy all .EXE files
SYMSTORE add /r /f C:\Windows\*.exe /s C:\SymbolStore\OSSymbols /t "Microsoft Windows" /v ""
REM Download symbols for .EXE files
SYMCHK /r C:\Windows\*.exe /s SRV*C:\SymbolStore\OSSymbols*http://msdn.microsoft.com/download/symbols

When the script is interrupted, you can just run it again. The DLLs and EXEs are stored using a hash. The hash should not have changed if the file has not changed. Symstore is smart enough to pick up only the missing files according the documentation: "SymChk always searches the downstream store before querying the symbol server.

When you are attached to the application you want to debug or have a .dmp-file open, type

.reload /f

That should force loading all symbols for the binaries.

Make sure you have configured your symbol servers properly before.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!