当前位置:网站首页>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 表示继续,回车

此后便可以在虚拟机中加载驱动,在源码中下断点调试了!
以上!
本文参考了以下文章,踩坑总结后写的:
边栏推荐
- Leetcode sword offer find the number I (nine) in the sorted array
- 【Transformer】入门篇-哈佛Harvard NLP的原作者在2018年初以逐行实现的形式呈现了论文The Annotated Transformer
- 视觉上位系统设计开发(halcon-winform)-1.流程节点设计
- win32创建窗口及按钮(轻量级)
- Digital image processing -- popular understanding of corrosion and expansion
- The state does not change after the assignment of El switch
- Dataframe returns the whole row according to the value
- 【云原生训练营】模块七 Kubernetes 控制平面组件:调度器与控制器
- Matplotlib drawing label cannot display Chinese problems
- Relationship between truncated random distribution and original distribution
猜你喜欢

Popular understanding of linear regression (II)

Idea does not specify an output path for the module
![[cloud native training camp] module VIII kubernetes life cycle management and service discovery](/img/87/92638402820b32a15383f19f6f8b91.png)
[cloud native training camp] module VIII kubernetes life cycle management and service discovery
![[Yu Yue education] scientific computing and MATLAB language reference materials of Central South University](/img/83/922efb4f88843f1b7feaccf2b515b9.jpg)
[Yu Yue education] scientific computing and MATLAB language reference materials of Central South University

What is one hot encoding? In pytoch, there are two ways to turn label into one hot coding

Popular understanding of random forest

视觉上位系统设计开发(halcon-winform)-1.流程节点设计

The markdown file obtains the pictures of the network and stores them locally and modifies the URL

从 flask 服务端代码自动生成客户端代码 -- flask-native-stubs 库介绍

Finally, someone explained the financial risk management clearly
随机推荐
视觉上位系统设计开发(halcon-winform)-4.通信管理
Solve the problem that pushgateway data will be overwritten by multiple push
XWiki Installation Tips
Apache ant extension tutorial
Popular understanding of linear regression (I)
Halcon与Winform学习第二节
socket.io搭建分布式Web推送服务器
Mysql报错:[ERROR] mysqld: File ‘./mysql-bin.010228‘ not found (Errcode: 2 “No such file or directory“)
软件安装信息、系统服务在注册表中的位置
Besides lying flat, what else can a 27 year old do in life?
[daily training] 395 Longest substring with at least k repeated characters
Global and Chinese markets for indoor HDTV antennas 2022-2028: Research Report on technology, participants, trends, market size and share
基于SVN分支开发模式流程浅析
What is embedding (encoding an object into a low dimensional dense vector), NN in pytorch Principle and application of embedding
Popular understanding of gradient descent
Using multipleoutputs to output multiple files in MapReduce
[set theory] inclusion exclusion principle (complex example)
Halcon与Winform学习第一节
Incluxdb2 buckets create database
Calibre LVL