如何设置windbg自动下载所有符号? [英] how can i set windbg to automatically download all the symbols?

查看:611
本文介绍了如何设置windbg自动下载所有符号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是编程和调试的新手。

我花了很多时间离线(没有互联网),并且正在阅读《 Inside Windows Debugging》一书,但有时有时候,我发现自己需要一个pdb文件。

i spent a lot of time offline (without internet), and am reading Inside Windows Debugging book, but from time to time, i found myself in need to a pdb file.

我做了一些挖掘,发现了以下URL: http://msdn.microsoft.com/en-us/windows/hardware/gg463028.aspx ,但是版本太多,我花了一些时间试图弄清楚如何找到正确的版本。

i did some digging and i found this URL: http://msdn.microsoft.com/en-us/windows/hardware/gg463028.aspx, but too many versions, i spend some time trying to figure out how to find the right version.

我确实找到了正确的版本,并且我确实下载了它,但是没有运气(花了我6个多小时(下载200 Mb),但是我发现自己处于圈子的开头(即使构建是匹配的,pdb也不合适),并且我需要活跃的互联网来继续阅读我的书,这在我学习期间无法获得

i did find the right build, and i did downloaded it, but no luck (took me more than 6 hour to download 200 Mb), but i found myself on the beginning of the circle (pdb are not the right one, even if the build is a match), and i need active internet to continue reading my book, which i can not get during to the country policies.

我的问题很简单,我如何让windbg一次下载所有二进制文件的所有符号。

my question is simple, how can i make windbg download all the symbols for all the binaries all at once.

操作系统信息:
版本:Windows 7 Ultimate(x86)
内部版本:7601.win7sp1_gdr.130104-1431

os info: Version: windows 7 ultimate (x86) Build: 7601.win7sp1_gdr.130104-1431

谢谢,因为耐心并且读了我的英语不好:)

thank, for being patient and read my bad English :)

推荐答案

我认为您正在寻找的文章构建调试环境

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

基本上,它将为您当前安装的所有文件下载符号。我两个月前做了一次Windows 7安装,并且运行良好-但是它占用了8.3 GB磁盘空间,当然下载时间也很长。

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.

这个概念是要遍历Windows目录中的所有DLL和EXE,将文件添加到本地符号存储,然后在线检查符号。

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

脚本被中断后,您可以再次运行它。 DLL和EXE使用哈希存储。如果文件未更改,则哈希值也不应更改。 Symstore非常聪明,可以根据文档选择仅丢失的文件: SymChk始终在查询符号服务器之前搜索下游存储。

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.

这篇关于如何设置windbg自动下载所有符号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆