如果在VM上安装驱动程序,如何调试Windows设备驱动程序以及要调试的内容? [英] How to debug windows device driver and what to debug if driver is installed on VM?

查看:77
本文介绍了如果在VM上安装驱动程序,如何调试Windows设备驱动程序以及要调试的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好



我在同一台机器上使用VS 2012和VM。

同一台机器上的主机Win7_x64和VM再次是Win7_x64

使用VS 2012进行调试,即在VM上使用VS和管道串行连接。



一切正常。我可以使用VS内置的进程来加载VM上的驱动程序。

我在微软网站上建立,链接并安装KmdfSmall驱动程序到VM上

我在VM上构建,链接并安装另一个非常小的测试驱动程序。



是的,所有驱动程序都显示在VM的设备管理器中。



当我在调试模式下按下所有主机进入VS时;所有断点也正在读取.c和.cpp文件。



但是当我按f10检查代码流No Source Code Available时问题就出现了窗口正在打开。



实际上我不太熟悉应该怎么做以及它应该去哪里但是在调试指针时VS的正常C程序情况下在源文件中提前,所以在窗口设备驱动程序中它应该去哪里。



因此如何在这里调试驱动程序以及我应该检查什么才能理解驱动程序是否正确安装工作正常。



附上几张图片以获得更好的主意。它会让你知道我已经达到了多少。



这里我试图在线调试OSR的NOTHING驱动程序

http:/ /www.osronline.com/article.cfm?article=390



请指导我调试内容的最佳方向以及如何在此Windows设备驱动程序中使用。



一个图像是主机有VS而另一个图像是VM已经安装了驱动程序。

请帮我调试驱动程序和理解它的工作。

Hello

I'm using VS 2012 and VM on same machine.
Host Win7_x64 and VM on same machine is again Win7_x64
Debug using VS 2012, i.e using VS and pipe serial connection on VM.

Everything is proper. I'm able to load driver on VM using VS's in built process to attach.
I've build, link and install KmdfSmall driver given on microsoft website onto VM
I've build, link and install another very small test driver onto VM.

Yes, all drivers are showing very properly into device manager of VM.

When ever I'm pressing break all onto host in debug mode into VS; all break points are also becoming read on .c and .cpp files.

But the question comes here when I pressed f10 for checking code flow "No Source Code Available " window is getting open.

Actually I'm not very much familiar that how and where it should go but as in normal C program case in VS during debug the pointer go ahead in source file so here in window device driver where it should go.

thus how to debug driver here and what should I check to understand that driver is installed properly and working fine.

Attaching few images to get better idea. It will let you know that how much I reached.

Here I'm trying to debug NOTHING driver of OSR online
http://www.osronline.com/article.cfm?article=390

Kindly guide me to the best direction of what to debug and how in this windows device driver.

One image is of host having VS and another image is of VM where driver has been installed.
Please help me to debug the driver and understand its working.

推荐答案

你好,



在目标上,禁用驱动程序同时保持VS进入将调试模式运行到主机上。

然后重新启动目标,一旦启动驱动程序就启用驱动程序

它将跳转到运行调试模式的VS到主机上已经解决的断点。然后按F5然后继续。



问候

matt
Hello,

On target, disable the driver meanwhile keep the VS into running debug mode onto host.
Then restart the target, enable the driver as soon as enable the driver onto target
it will jump to VS running into debug mode onto host at the already settled breakpoint. then after just press F5 and go ahead.

regards
matt


这篇关于如果在VM上安装驱动程序,如何调试Windows设备驱动程序以及要调试的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆