windbg + vmware 内核调试 环境设置
windbg 符号设置:
配置环境变量:
_NT_SYMBOL_PATH
SRV*c:\mysymbol* http://msdl.microsoft.com/download/symbols
vmware 添加串口:
编辑虚拟机设置-->硬件-->打印机移除(存在)-->添加-->串行端口-->输出到命名管道-->轮询时主动放弃CPU
windows 调试启动项设置:
XP:
开始-->我的电脑-->工具-->文件夹选项-->查看
修改C:\\boot.ini 添加:
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional Debug" /fastdetect /debugport=com1 /baudrate=115200
win7:
管理员权限启动:cmd
bcdedit /copy {current} /d "Windwos7"
bcdedit /debug ON
bcdedit /bootdebug ON
bcdedit /dbgsettings
bcdedit /timeout 10
win10:
管理员权限启动:cmd
bcdedit /dbgsettings serial baudrate:115200 debugport:1
bcdedit /copy {current} /d WinDebug
bcdedit /displayorder {current} {ID}
bcdedit /debug {ID} ON
为配置号的虚拟机创建快照,方便以后还原到最初状态。
windbg 快捷方式设置:
xp: -b -k com:pipe,port=\\.\pipe\com_1,resets=0
vista: -b -k com:port=\\.\pipe\com_1,baud=115200,pipe
测试:
vmware-->windbg-->g-->ctrl + break -->lm