Windbg串口联调
来源:互联网 发布:淘宝店如何打快递单 编辑:程序博客网 时间:2024/05/23 15:56
使用Windbg进行内核驱动调试时,可以使用的连接方式有很多:USB、网络、串口等。这里主要讲一下串口调试时的连接和设置方法。
一、目标机的设置
a. 以下是Windbg的帮助文档中给出的设置方法:
On the target computer, open a Command Prompt window as Administrator, and enter the following commands, wheren is the number of the COM port used for debugging on the target computer, andrate is the baud rate used for debugging:
- bcdedit /debug on
- bcdedit /dbgsettings serial debugport:n baudrate:rateNote The baud rate must be the same on the host computer and target computer. The recommended rate is 115200.
- Reboot the target computer.
b. 有一种更简便的设置方法
快捷键”Win + R“打开”运行“窗口,输出msconfig,进入系统配置,在”引导“选项卡中,选择”高级选项“,勾选”调试“选项,并进行相应的调试设置。确定后,直接重启即可。
Windows系统在启动过程中会调用KdDebuggerInitialize0来对通信扩展模块进行初始化,此时会进行COM端口的初始化。当初始化COM端口后,HAL模块中会有一个全局变量记录下已被内核调试使用的COM端口,此后的串行口驱动程序(serial.sys)会检查这个变量,并跳过用于调试用途的串行端口,因此,在目标系统的设备管理器中我们看不到用于内核调试的串行端口。
二、主机的设置
首先要确定的是主机使用的串口的端口号。当使用串口线将主机和目标机连接后,在主机上打开设备管理器,查看串口线对应的设备的COM端口号,即为联机调试时主机需要使用的端口号。
以管理员权限打开Windbg后,选择”kernel debug",在COM选项卡下进行相应的设置:
Baud Rate一般设置为115200,Port端口号设置为COMn,(其中n即为刚才在设备管理器中查看到的COM端口号)
设置完成后,重启目标机,即可实现联机内核调试。此时主机上的Windbg是无法操作的,需要使用“Ctrl + Break”去中断目标机的运行后,才可以对主机上的Windbg进行操作。
- Windbg串口联调
- Windbg使用串口进行local kernel debug
- 利用VMKD加速WinDBG虚拟机联调
- windbg与虚拟机双机联调笔记
- Windbg和VirtualBox通过虚拟串口调试Win 8
- Windbg和VirtualBox通过虚拟串口调试Win 8
- WinDBG
- windbg
- WINDBG
- windbg
- WinDBG
- WinDbg
- WinDbg
- Windbg
- WinDBG
- WinDbg
- WinDBG
- windbg
- Android中的震动Vibrator的使用。
- js中的三种对话框
- [POJ 3280]Cheapest Palindrome[DP]
- 数据持久化之NSCoding/NSKeyedArchiver
- linux修改文件权限
- Windbg串口联调
- rd /S /Q
- MyEclipse2014快速配置Spring & Spring Testing, Spring AOP简单使用
- 【OpenGL/ES】 第01讲 3D数学-逆矩阵的推导
- 2016年大数据发展趋势预测
- Objective-C多次push操作后快速连续返回问题
- Hadoop2安装-单机模式
- eclipse中常用字体设置
- Socket 通信