KMDF Walkthrough: Debugging the Osrusbfx2 Sample

This section shows how to use WinDbg with the KMDF Osrusbfx2 sample, starting with the EvtDriverDeviceAdd callback routine which is a key part of the driver load and startup code. As with the UMDF example, the Osrusbfx2 sample has no known bugs, but using WinDbg to walk through the source code is a convenient way to demonstrate the basics of how to use WinDbg with KMDF drivers.

Prepare for a Debug Session for Osrusbfx2

These steps apply to the information presented in “How to Prepare for KMDF Debugging” earlier in this chapter.

To prepare the systems for debugging

  1. Build the driver, and then install it on the test computer.

  2. Build the Osrusbfx2 test application, and then copy it to a convenient folder ...

Get Developing Drivers with the Windows® Driver Foundation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.