解决WinDbg调试VMWare虚拟机连接不上

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/kulala082/article/details/77931402

/*设定端口*/
在VMware建立系统Windows XP SP3,并正确设定了端口号:
增加"串行端口",
"\\.\pipe\com_1"
"该端是服务器。"
"另一端是应用程序。"
选中 "已连接"
选中 "启动时连接"

设置虚拟机Windows XP SP3系统中的 boot.ini文件

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect /noguiboot
//增加
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect /noguiboot /debug /debugport=com1 /baudrate=115200

WinDbg的快捷方式的属性目标"框中,加上参数 -k com:port=\\.\pipe\com_1,baud=11520,pipe

/*开始操作*/

1首先运行 VMware ,启动虚拟机 ,到系统启动选择,选择 "Microsoft Windows XP Professional - debug" 项,先不要按回车。
2通过刚才设置好的快捷方式运行WinDbg。
3在系统中选择 "Microsoft Windows XP Professional - debug" 项,按回车。
\\\\\\\\\\\\\\\\\\\\\\\\
此时WinDbg显示:
Microsoft (R) Windows Debugger Version 6.10.0003.233 X86
Copyright (c) Microsoft Corporation. All rights reserved.


Opened \\.\pipe\com_1
Waiting to reconnect...
\\\\\\\\\\\\\\\\\\\\\
4 稍等片刻,如果很长时间没有连接上的话,可以按 WinDbg 菜单中的 "Debug"->"Kernel Connection"->"Resynchronize"。

此时WinDbg显示的显示没有变化:
Microsoft (R) Windows Debugger Version 6.10.0003.233 X86
Copyright (c) Microsoft Corporation. All rights reserved.


Opened \\.\pipe\com_1
Waiting to reconnect...

==================================================================================

原因: VMWare模拟的串口是com2, 所以应该改为: 

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect /noguiboot /debug /debugport=com2 /baudrate=115200

修改完后就可以正常连接了。

但是刚刚连接上的时候,虚拟机里的Windows系统会被中断,貌似死机,这时,请在WinDbg的命令提示符“kd>"后面输入”g“并按回车键,这样系统就正常启动了。

猜你喜欢

转载自blog.csdn.net/kulala082/article/details/77931402