VS2005的配置:
1、下载ddkwizard_setup,ddkbuild_bat.zip,ddkbuild_cmd.zip。下载网址(http://ddkwizard.assarbad.net/)
2、拷贝ddkbuild.bat,ddkbuild.cmd到DDK的安装目录。(C:/WinDDK)
3、配置环境变量:系统变量——Path中加入C:/WinDDK,新建一个系统变量为WLHBASE,其值为C:/WinDDK/6000。
4、配置VS2005,在Tools——Options——Projects and Solutions——VC++ Directories——Execute files中新建一行,其值为C:/WinDDK。
5、安装ddkwizard_setup。
内核调试环境配置:
1、安装WinDBG,安装Symbols(务必用最新版本)。
2、设置WinDBG的Symbols,File——Symbols File Path,填入C:/Symbols;SRV*C:/Symbols*http://msdl.microsoft.com/download/symbols”。
3、在虚拟机中加入Serial Port,其值为Output to name pipe——//./pipe/com_1——The end is the server——The other end is an application——Connect at power on——Advanced(Yield CPU)
4、配置虚拟机中操作系统,打开C:/boot.ini,加入一行multi(0)disk(0)rdisk(0)partition(1)/WINDOWS="Microsoft Windows XP Professional -Debug" /noexecute=optin /fastdetect /debug /debugport=com1 /baudrate=115200。设置此系统的Serial Port的速率为115200(方法:设备管理器)
5、Vista:
设置端口COM1, baudrate为115200
bcdedit /dbgsettings serial baudrate:115200 debugport:1
复制一个开机选项, 以进入OS的debug模式
bcdedit /copy {current} /d DebugEntry
接着增加一个新的选项到引导菜单
bcdedit /displayorder {current} {80ec5928-ca70-11de-9df6-000c29c984e4}
激活DEBUG : bcdedit /debug {ID} ON
bcdedit /debug {80ec5928-ca70-11de-9df6-000c29c984e4} ON
5、配置WinDBG,新建一个WinDBG的快捷方式,目标:"C:/WinDBG/windbg.exe" -k com:port=//./pipe/com_1,baud=115200,pipe
6、先运行虚拟其的系统,以Debug模式运行,然后再运行刚才建立的那个快捷方式。