之前每次搭建都要网上搜教程, 太麻烦了, 直接写出重点步骤
[虚拟机部分]
打开虚拟机之后, 进入 C 盘根目录, 然后 点 [工具] [文件夹选项] [查看] 中 将 [隐藏受保护的操作系统文件] 的钩钩去掉.
然后下面选择 [显示所有文件和文件夹] , 这样就会出现一个 boot 的文件, 以 TXT 方法打开之后, 直接在后面加上下面的红字部分
- [boot loader]
- timeout=1
- 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
- /noguiboot
- multi(0)disk(0)rdisk(0)partition(1)\Windows="MicrosoftWindows XP Professional" /noexecute=optin /fastdetect /debug/debugport =com1/baudrate=115200
然后将虚拟机电源切断, 选择 [虚拟机] [设置] (英文版好像是 Command Setting) , 然后在默认的 [HardWare] 页中点击 [添加] (ADD) , 然后选择 [Serial Port] , 选择 [Serial Port] (串口), 单击下一步, 选择 [Output to named pipe ] 单击下一步, 前两个为 [\\.\pipe\com_1] 和 [This end is the server] , 第三个修改为 [The other end is anapplication]
这样虚拟机部分就已经设置好了.
[主机部分]
主机很简单, 将 Windbg 在桌面创建一个快捷方式以便修改运行参数, 创建后 右击属性 , 在 [快捷方式] 页中的 [目标] 后添加下面这段的红色部分
"C:\Program Files\Debugging Tools for Windows (x86)\windbg.exe"-b -k com:pipe,port=\\.\pipe\com_1,resets=0
来源: http://www.bubuko.com/infodetail-3364786.html