当前位置:网站首页>WinDbg-虚拟机-双机调试-驱动文件的调试
WinDbg-虚拟机-双机调试-驱动文件的调试
2022-06-11 02:43:00 【shlyyy】
驱动文件的调试
前言
本文讲解用WinDbg和虚拟机调试驱动程序的具体过程。
不涉及WinDbg和虚拟机的配置问题。
调试环境为WinDbg+VMware+Win7
一、构建调试环境
以调试状态运行虚拟机中的操作系统,然后与WinDbg建立连接·。

二、在要调试的驱动程序中下断点
1.WinDbg中打开驱动文件



2.在驱动程序中下断点
首先虚拟机中的操作系统中断,然后输入指令:bp CharConvertRing0!DeviceIoControlDispatch
其中bp是WinDbg中下断点的指令,CharConvertRing0是要调试的驱动程序源文件,DeviceIoControlDispatch是要调试的函数。

然后g指令让操作系统继续运行。
三、准备调试
1.在虚拟机中的操作系统中加载驱动文件

2.在虚拟机中的操作系统中用vs打开三环程序准备调试

四、开始调试
1.vs中下断点后F5键启动调试。

2.在要调试的函数中F11键进入函数内部
在这里我在Ring3调用DeviceIoControl函数向驱动程序发送IRP,IRP(IRP_MJ_DEVICE_CONTROL)被驱动程序的DeviceIoControlDispatch派遣函数捕获,于是就直接进入DeviceIoControlDispatch函数。

由此就可以像vs一样单步调试了,其中单步调试快捷键如下图:

3.WinDbg的其他窗口
可以在WinDbg中查看其它窗口,如监视窗口Watch,内存窗口Memory,寄存器窗口等等。

总结

边栏推荐
- jdbc工具类的问题
- OpenJudge NOI 1.13 17:文字排版
- Arduino uses nRF24L01 module for wireless communication
- Chapter VII introduction to common protocols (1)
- 二叉树最小最低公共祖先
- Determine whether a string of numbers is the result of a quick sort
- Android WiFi hide SSID
- UBIFS FAQ and HOWTO
- WordPress upgrade error: briefly unavailable for scheduled maintenance [resolved]
- Rs232/rs485 to 4G DTU uploading temperature and humidity sensor data based on Modbus protocol to remote TCP server
猜你喜欢

基于互联网架构演进, 构建秒杀系统

第七章 常用的协议简介(1)

Looking at the ups and downs of the mobile phone accessories market from the green Union's sprint for IPO

If you understand the logic of mining and carbon neutrality, you will understand the 100 billion market of driverless mining areas

Young people fleeing big cities: shouldering housing prices and pressure, but not epidemics

VMware虚拟机IP,网关设置。虚拟机ping不通外网

Three special data types, day3 and redis (geographic location, cardinality statistics and bitmap scene usage)

银行选择电子招标采购的必要性

HUST Software Engineering (Experiment 2) -- TDD test driven development experiment.

Arduino uno connected to jq8900-16p voice broadcast module
随机推荐
Application of the remote acquisition IOT gateway of the Bashir trough flowmeter in open channel flow monitoring
MySQL is required to sort in ascending order greater than or equal to the current time, and then in descending order less than the current time
Help you distinguish GNU, GCC, GCC and G++
Can Xiaoxiang life become the "Yonghui" in the discount industry after the completion of the round a financing of tens of millions of yuan?
Fuluo classic source code Fuluo classic system development principle sharing
Will your company choose to develop data center?
Helm deploy traifik ingress
B / Qurt Utilisateur Guide (19)
已解决: JDBC连接Mysql失败报错: 'The last packet sent successfully to the server was 0 milliseconds ago. '
CPT 102_ LEC 18
Arduino使用NRF24L01模块进行无线通信
Cygwin reports an error child_ info_ fork::abort: XXX. dll: Loaded to different address: parent(XXX) != child(XXX)
AOSP ~ 默认开启开发者模式
【大咖秀】博睿数据眼中的AIOps,选择正确的赛道正确的人
[big guy show] aiops in the eyes of Borui data, choosing the right track and the right people
[Fibonacci series]
intXX_ T and int_ fastXX_ T what is the difference- What is the difference between intXX_ t and int_ fastXX_ t?
从绿联冲刺IPO,看手机配件市场沉浮录
CPT 102_ LEC 17
Unity项目优化详解(持续补充ing)