当前位置:网站首页>VS2017通过IP调试驱动(双机调试)
VS2017通过IP调试驱动(双机调试)
2022-07-03 15:20:00 【宇龍_】
前言
之前写了篇博客,是用vs2017通过串口调试虚拟机上的驱动,但感觉串口调试没有网口调试方便,这里写一篇通过网口调试驱动的方法。
关于如何安装WDK、如何编写驱动,网上有一大堆教程,而且我之前好像也写过?总之在VS2017上编写、配置驱动还是很简单方便的。
正文
这里我们称装了VS2017的那台主机为调试机(IP为 192.168.101.5),虚拟机上运行驱动主机叫被调试机(IP为 192.168.123.128)
要保证双方能够相互PING 通,如果不通的话要关下双方的防火墙。
据说要保证,虚拟机是Win8及以上系统?我没试过,但最好是专业版的系统,我自测win10家庭版是不行的。
一、被调试机(虚拟机)的配置
1、首先,我们需要在被调试机上执行以下命令,CMD管理员权限运行并执行以下命令(设置调试模式,设置调试机的IP)
bcdedit /set {default} DEBUG ON
bcdedit /set TESTSIGNING ON
bcdedit /debug on
//hostip 为调试机的IP,不要填成虚拟机的IP!port为网络通讯端口,key为口令要用点号分割
bcdedit /dbgsettings net hostip:192.168.101.5 port:50080 key:theprevious.keys.arenot.secure//通过下面的命令查看配置是否正确
bcdedit /dbgsettings
2、被调试机上(再次强调是虚拟机)需要安装WDK Test Target工具,注意32位系统和64位系统要装对应架构的调试工具,我的工具路径在
C:\Program Files (x86)\Windows Kits\10\Remote\x64
C:\Program Files (x86)\Windows Kits\10\Remote\x86
![]()
总之,随便用一个搜索工具很容易就能找到了。
3、被调试机上配置完成并安装了WDK Test Target工具后,立即重启系统。
二、调试机(装了VS2017主机)的配置
1、配置被调试机信息





2、附加到内核并调试



显示connected就表示成功啦!!!!!!
但还需要如下操作!否则无法下断点!
在connected成功后还需要点击全部中断,此时虚拟机已经不能动了

我等了大约2分钟后,出现了 int 3断点

此时在命令行中输入 g 表示继续,回车

此后便可以在虚拟机中加载驱动,在源码中下断点调试了!
以上!
本文参考了以下文章,踩坑总结后写的:
边栏推荐
- Calibre LVL
- 官网MapReduce实例代码详细批注
- 整形和浮点型是如何在内存中的存储
- Leetcode the smallest number of the rotation array of the offer of the sword (11)
- 从 flask 服务端代码自动生成客户端代码 -- flask-native-stubs 库介绍
- Explanation of time complexity and space complexity
- Finally, someone explained the financial risk management clearly
- 软件安装信息、系统服务在注册表中的位置
- Popular understanding of decision tree ID3
- 【Transformer】入门篇-哈佛Harvard NLP的原作者在2018年初以逐行实现的形式呈现了论文The Annotated Transformer
猜你喜欢

Tensorflow realizes verification code recognition (III)

Solve the problem that pushgateway data will be overwritten by multiple push

Halcon and WinForm study section 1

Can‘t connect to MySQL server on ‘localhost‘

Finally, someone explained the financial risk management clearly

Leasing cases of the implementation of the new regulations on the rental of jointly owned houses in Beijing

解决pushgateway数据多次推送会覆盖的问题

Chapter 04_ Logical architecture

Besides lying flat, what else can a 27 year old do in life?

Halcon与Winform学习第二节
随机推荐
redis单线程问题强制梳理门外汉扫盲
Dataframe returns the whole row according to the value
QT common sentence notes
Detailed comments on MapReduce instance code on the official website
Matlab r2011b neural network toolbox precautions
[set theory] inclusion exclusion principle (complex example)
Popular understanding of linear regression (I)
Kubernetes帶你從頭到尾捋一遍
Explanation of time complexity and space complexity
【云原生训练营】模块七 Kubernetes 控制平面组件:调度器与控制器
[combinatorial mathematics] binomial theorem and combinatorial identity (binomial theorem | three combinatorial identities | recursive formula 1 | recursive formula 2 | recursive formula 3 Pascal / Ya
win32创建窗口及按钮(轻量级)
Redis single thread problem forced sorting layman literacy
Nppexec get process return code
Matplotlib drawing label cannot display Chinese problems
【pytorch学习笔记】Transforms
Halcon与Winform学习第二节
Introduction to redis master-slave, sentinel and cluster mode
[cloud native training camp] module VIII kubernetes life cycle management and service discovery
What is label encoding? How to distinguish and use one hot encoding and label encoding?