Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging

The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.

Check out The OSR Learning Library at:

How to trace IRPs between drivers?

wc2023wc2023 Member Posts: 38

I'm doing a live kernel debugging of a driver. I can see that it's sending an IRP to another driver using IofCallDriver function, and the other driver returns a generic error status code. I need to see where the target driver is failing,

I could get the device object and the parameters of the IRP using !devobj <addr> and !irp <addr> WinDbg commands before IofCallDriver is called.

But how do I trap processing of this IRP on the other end, or in the receiving driver?

Any suggestions will be appreciated.


  • Tim_RobertsTim_Roberts Member - All Emails Posts: 14,832

    What do you expect to find out? The other driver is not failing, it's just returning an error. (Which error?) If you can break in your driver where you call IoCallDriver, you can single step through it until it gets to the target (IoCallDriver isn't that complicated), and maybe you could set a breakpoint at IoCompleteRequest, but that gets called a lot.

    Tim Roberts, [email protected]
    Software Wizard Emeritus

  • Scott_Noone_(OSR)Scott_Noone_(OSR) Administrator Posts: 3,678

    You can also set an access breakpoint (ba) on Irp->IoStatus.Status to see where the driver sets the failure status value. Of course, depending on the way the driver is written this might be very far away from where the error actually originated.


  • wc2023wc2023 Member Posts: 38

    Yep, thanks guys.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 13-17 May 2024 Live, Online
Developing Minifilters 1-5 Apr 2024 Live, Online
Internals & Software Drivers 11-15 Mar 2024 Live, Online
Writing WDF Drivers 20-24 May 2024 Live, Online