一、调试环境简介
物理机:Windows11
虚拟机:WinXp sp3 (需要相对应版本WinXP内核调试符号表的加载)
软件及工具:Windbg
二、调试环境搭建
1. 配置WinXp系统启动项,将Windows设置为调试执行
打开虚拟机系统盘C盘找到boot.ini系统配置文件并对其进行修改。
重启系统可以进入Debug模式。
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect /debug /debugport=com1 /baudrate=115200
2. 配置VMware的管道虚拟串口
编辑此虚拟机设置---添加---串行端口---使用命名的管道
\\.\pipe\com_1
该端是服务器
另一端是应用程序
3. 配置WinDbg
File---Kernel Debug---COM
115200
\\.\pipe\com_1
pipe √
Reconnect √
4. 设置Windows内核符号表
File---Symbol File Path
srv*F:\Symbols
三、调试步骤
1. 配置windbg后点击确定
2. 打开winxp虚拟机进入调试模式
3. ctrl+break中断虚拟机进行调试