一、调试环境简介
物理机:Windows11
虚拟机:Win7/Win10
软件及工具:Windbg
二、调试环境搭建
1. 将Windows虚拟机设置为调试执行
bcdedit /dbgsettings serial baudrate:115200 debugport:1
bcdedit /copy {current} /d new
bcdedit /displayorder {current} {id}
bcdedit /debug {id} ON
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*http://msdl.microsoft.com/download/symbols
三、调试步骤
1. 配置windbg后点击确定
2. 打开win7/win10虚拟机进入调试模式
3. ctrl+break中断虚拟机进行调试