当前位置:网站首页>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 表示继续,回车
此后便可以在虚拟机中加载驱动,在源码中下断点调试了!
以上!
本文参考了以下文章,踩坑总结后写的:
边栏推荐
- Win10 enterprise 2016 long term service activation tutorial
- [transformer] Introduction - the original author of Harvard NLP presented the annotated transformer in the form of line by line implementation in early 2018
- Markdown file titles are all reduced by one level
- Influxdb2 sources add data sources
- Global and Chinese markets for flexible chips 2022-2028: Research Report on technology, participants, trends, market size and share
- Nppexec get process return code
- Calibre LVL
- Popular understanding of decision tree ID3
- Popular understanding of random forest
- 第04章_逻辑架构
猜你喜欢
The state does not change after the assignment of El switch
求字符串函数和长度不受限制的字符串函数的详解
Popular understanding of decision tree ID3
Halcon and WinForm study section 2
Matplotlib drawing label cannot display Chinese problems
Basic SQL tutorial
Jvm-05-object, direct memory, string constant pool
Kubernetes 进阶训练营 Pod基础
Halcon and WinForm study section 1
Summary of concurrent full knowledge points
随机推荐
The first character of leetcode sword offer that only appears once (12)
GCC cannot find the library file after specifying the link library path
Atlas atlas torque gun USB communication tutorial based on mtcom
Qt常用语句备忘
Tensorflow realizes verification code recognition (III)
阿特拉斯atlas扭矩枪 USB通讯教程基于MTCOM
Matlab r2011b neural network toolbox precautions
What is embedding (encoding an object into a low dimensional dense vector), NN in pytorch Principle and application of embedding
[pytorch learning notes] datasets and dataloaders
Concurrency-02-visibility, atomicity, orderliness, volatile, CAS, atomic class, unsafe
[cloud native training camp] module 7 kubernetes control plane component: scheduler and controller
Popular understanding of random forest
Idea does not specify an output path for the module
Using TCL (tool command language) to manage Tornado (for VxWorks) can start the project
视觉上位系统设计开发(halcon-winform)-3.图像控件
What is machine reading comprehension? What are the applications? Finally someone made it clear
[Yu Yue education] scientific computing and MATLAB language reference materials of Central South University
Jvm-03-runtime data area PC, stack, local method stack
自定义注解
Tensorflow realizes verification code recognition (II)