Windbg学习 (0x0001) 安装与基本配置
1.安装
根据微软MSDN官方建议,有三种方式安装Windbg,摘要如下:
3 ways to get Debugging Tools for Windows
- As part of the WDK
Install Microsoft Visual Studio and then install the Windows Driver Kit (WDK). Debugging Tools for Windows is included in the WDK. You can get the integrated environment here.
- As part of the Windows SDK
Install the Windows Software Development Kit (SDK). Debugging Tools for Windows is included in the Windows SDK. You can get the Windows SDK here.
- As a standalone tool set
If you want to download only Debugging Tools for Windows, install the Windows SDK, and, during the installation, select the Debugging Tools for Windows box and clear all the other boxes.
我采取的方式为:下载Windows SDK ,安装过程中,只勾选Debugging Tools for Windows。
2.配置
2.1.Workspace
工作空间定义了以下内容:
窗口布局,调试符号文件路径,断点,打开的文件,别名等自定义信息
Windbg有一些默认工作空间,也可以根据自己的习惯,调整配置后另存工作空间。相关菜单如下
可以通过这些菜单,执行打开已有的工作空间,另存等操作。
2.2 符号文件配置
可以通过菜单设置符号文件
SRV*E:\Symbol\Online*http://msdl.microsoft.com/download/symbols;E:\Symbol\MySymbol
上述符号文件定义:SRV*E:\Symbol\Online*http://msdl.microsoft.com/download/symbols 指的是在线符号文件(http://msdl.microsoft.com/download/symbols ),下载缓存到本地目录(E:\Symbol\Online)
以及自己编译生成的符号文件放在本地路径(E:\Symbol\MySymbol)
关于符号文件,可以通过这篇博客了解:
http://www.cnblogs.com/itech/archive/2011/08/15/2136522.html
英文版出处
http://www.wintellect.com/devcenter/jrobbins/pdb-files-what-every-developer-must-know