如何实现WinDbg和VM的调试工作

来源:互联网 发布:golang protobuf 使用 编辑:程序博客网 时间:2024/06/05 18:36

1、确认host的COM1端口设置是否符合要求。(我的电脑--属性--硬件--设备管理器--端口--COM1--端口设置)

     主机上“端口设置”的“每秒位数”为115200;”数据位“为8;“奇偶校验”为无;”停止位“为1,“流控制”为无;

2、确认VM启动系统以后,Serial Port是否开启。(VM的右下角,Serial Port点亮了没有)

     在VM的"Virtual Machine Settings"设置里的“Use named pipe"下面三项的内容分别为:\\.\pipe\com_1、This end is the client、The other end is an application

3、确认你的系统启动项是否选择了debug模式启动。(就是VM...

[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

或者

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


选择com1还是com2是依据VM中Serial Port2还是Serial Port来确定


【参考】

1、http://bbs.pediy.com/archive/index.php?t-125072.html

2、http://blog.csdn.net/zxb2007/article/details/6081397