虚拟机版本 VMware.Workstation.v7.1.2
Windows 版本 YLMF_XP3_Pure.ISO
Windbg 版本 dbg_x86_6.11.1.404.msi
符号文件版本 WindowsXP-KB936929-SP3-x86-symbols-update-ENU.exe
一、虚拟机设置
Settings ->Hardware ->Add ->Serial Port(串口) ->Output to named pipe ->第一项改为:\\.\pipe\com_2 ->最后一项改为: The other end is an application
启动VM 中的windows
修改文件C:\boot 加入:
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect /debug /debugport=com_2 /baudrate=115200
重启VM 中的windows,选调试模式
二、Windbg 设置
修改Windbg启动参数,这里直接创建一个bat文件,内容如下,然后运行
windbg.exe -b -k com:port=\\.\pipe\com_2,baud=115200,pipe
设置Windbg 的符号文件
下载了符号文件后(WindowsXP-KB936929-SP3-x86-symbols-update-ENU.exe),解压到个人指定的文件夹-"x:/symbols_folder"。
Windbg ->File ->Symbol file path ->输入 c:/symbols_folder;srv*c:/symbols_folder*http://msdl.microsoft.com/download/symbols
三、真机设置
设备管理器 ->端口 ->双击 Com1 ->端口设置 ->每秒位数 ->115200
四、Windbg 连接VM
运行Windbg ->File ->Kernel debug -> Baud Rate 填115200 ->Port 填\\.\pipe\com_2 ->钩选Pipe 和Reconnect ->确定
连上后 ->Debug ->Break 中断VM 中的Windows ,这时可以单步调试Windows 系统了