Chapter 17. Testing and Debugging DriversCHAPTER OBJECTIVES
In many ways, this chapter should be first in the book. After all, it is not possible to design software (that works, anyway) without considering a testing and debugging strategy from the very beginning. Of course, since the purpose of the book is to present the Windows 2000 driver architecture, the focus has been to explain the way drivers work, not fail. The purpose of this chapter is to introduce the concept of writing defensive driver code. By considering the ways in which code can fail, the design and implementation of the driver can facilitate the isolation and reporting of the error. The techniques covered in this chapter include a presentation of trace methods and procedures. The chapter also presents some tools provided by Microsoft with the DDK and elsewhere. For example, the very useful WinDbg debugger operation is explained. And, by placing this chapter at the end, it does make for easy reference whenever it is needed.
|