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

此后便可以在虚拟机中加载驱动,在源码中下断点调试了!
以上!
本文参考了以下文章,踩坑总结后写的:
边栏推荐
- Nppexec get process return code
- Detailed comments on MapReduce instance code on the official website
- Jvm-08-garbage collector
- Jvm-05-object, direct memory, string constant pool
- 运维体系的构建
- Characteristics of MySQL InnoDB storage engine -- Analysis of row lock
- 基础SQL教程
- GCC cannot find the library file after specifying the link library path
- Digital image processing -- popular Canny edge detection
- [pytorch learning notes] datasets and dataloaders
猜你喜欢

详解指针进阶2

百度智能云助力石嘴山市升级“互联网+养老服务”智慧康养新模式

秒杀系统1-登录功能

需要知道的字符串函数

Digital image processing -- popular Canny edge detection
![[cloud native training camp] module 7 kubernetes control plane component: scheduler and controller](/img/a4/2156b61fbf50db65fdf59c8f5538f8.png)
[cloud native training camp] module 7 kubernetes control plane component: scheduler and controller

Final review points of human-computer interaction

详解指针进阶1

Jvm-03-runtime data area PC, stack, local method stack

Jvm-04-runtime data area heap, method area
随机推荐
redis单线程问题强制梳理门外汉扫盲
Idea does not specify an output path for the module
【Transform】【实践】使用Pytorch的torch.nn.MultiheadAttention来实现self-attention
Finally, someone explained the financial risk management clearly
Stress test WebService with JMeter
Use of Tex editor
解决pushgateway数据多次推送会覆盖的问题
什么是one-hot encoding?Pytorch中,将label变成one hot编码的两种方式
互斥对象与临界区的区别
SQL server installation location cannot be changed
【pytorch学习笔记】Datasets and Dataloaders
Kubernetes - yaml file interpretation
Popular understanding of ovo and ovr
求字符串函数和长度不受限制的字符串函数的详解
Jvm-03-runtime data area PC, stack, local method stack
【云原生训练营】模块八 Kubernetes 生命周期管理和服务发现
Didi off the shelf! Data security is national security
Incluxdb2 buckets create database
需要知道的字符串函数
Using TCL (tool command language) to manage Tornado (for VxWorks) can start the project