我是驾驶员发展的新手,而且在更高层次的语言中习惯了更多的以测试为导向的方法,所以转向那种无法轻松测试的环境,一直是我的一步.我正在使用虚拟PC作为我的测试环境,目前必须重置它,打开设备管理器,选择设备,点击一堆“你真的确定你不会安装这些系统驱动程序之一”类型对话框,然后最后重置测试环境,同时在主机中重新启动WinDbg,就像测试环境正在启动… argh一样.
在重复这个过程之后,很多次,已经有很多次了,肯定会是一个更好的做法吗?商业驱动程序开发人员在测试环境中运行驱动程序的工具/方法/技巧?
请注意,这不是关于单元测试驱动程序,我还没有达到这个阶段,或者知道是否可能.这只是关于使用WinDbg启动测试环境,以确保我可能做的一些小的改变正在做我期望的.
但是,如果您使用Visual Studio开发用户级应用程序,则可以将其用于内核设备驱动程序开发,也可以使用VisualDDK(VirtualKD通过命名管道进行调试,速度比虚拟COM端口快),其特别涉及到烦恼你提到的从其主页:
… This project brings the simplicity and
convenience of Windows application
development to the driver development
world. No more manual creation of
build scripts,copying of driver
files,installing drivers from INFs,
switching between WinDbg and the
source editor or waiting for seconds
after each step due to the extra-slow
virtual COM port. Just create a driver
project using a convenient Driver
Wizard,select a virtual machine,and
enjoy debugging your driver directly
from Visual Studio. Want to test a change? Just normally press Shift-F5,modify your driver,rebuild it and launch again. VisualDDK will unload the old driver,install the new one and load it automatically and quickly. Bored with WinDbg loading symbol files for minutes and looking up symbols for seconds? Just let VisualDDK optimize this for you using its own DIA-based symbol engine. Using C++/STLPort in your drivers? VisualDDK will natively visualize all STL containers and strings,as good as Visual Studio does for user-mode applications. …