Local wdm debug

I’m running Driver Verifier on a very old WDM driver and initially I was able to generate a couple crash dumps that led me to potential problems I have since corrected. Unfortunately the current problem manifests as “This device cannot start. (Code 10)”. Since no crash occurs I can’t figure out how to track down the issue. If the verifier is diabled the driver seems to work just fine, but I’m assuming there are still possibly dangerous pieces of code. With newer drivers I could simply use traceview on the same machine but this driver uses KdPrint.
I am also unable to debug remotely. I have no serial ports and I’m using Windows 7 so an ethernet debug connection is not permitted. I see there is a USB option but I can’t find a USB Debug Cable anywhere and it sounds as if this is very hard to do even if I could find one.

Is it possible to run Windbg on the target machine? I can’t find any way to do this if so. Any other possible options I can explore here?

Robert,

Check how your driver is signed. Do you use SHA-1 or SHA-2 signature.

Simplest way to debug problems like Driver startup error is to use virtual machine and e.g. Serial output to Named Pipe.

I’m not signing the driver. Is this a necessity to load a driver being monitored by Driver Verifier?

“use virtual machine and e.g. Serial output to Named Pipe.”

I have no idea how to do this. I’m not familiar with this method. I’ve only ever used Windbg and TraceView. Would this startup error even show up on a virtual machine? It’s for a PCI board and only shows up when I enable the Driver Verifier. If Driver Verifier is disabled I get no error. I also need the physical board and I don’t know that I could use a virtual machine for a hardware driver.

No, you can’t debug a single system using WinDbg.

Can you add a 1394 card to the system?

-scott
OSR
@OSRDrivers

wrote in message news:xxxxx@windbg…

I’m running Driver Verifier on a very old WDM driver and initially I was
able to generate a couple crash dumps that led me to potential problems I
have since corrected. Unfortunately the current problem manifests as “This
device cannot start. (Code 10)”. Since no crash occurs I can’t figure out
how to track down the issue. If the verifier is diabled the driver seems to
work just fine, but I’m assuming there are still possibly dangerous pieces
of code. With newer drivers I could simply use traceview on the same
machine but this driver uses KdPrint.
I am also unable to debug remotely. I have no serial ports and I’m using
Windows 7 so an ethernet debug connection is not permitted. I see there is
a USB option but I can’t find a USB Debug Cable anywhere and it sounds as if
this is very hard to do even if I could find one.

Is it possible to run Windbg on the target machine? I can’t find any way to
do this if so. Any other possible options I can explore here?

Maybe to the target but not my host.

I went ahead and replace the kdprint calls with TraceEvents. Couldn’t seem to get the trace.h file to do it for me.
//
// This comment block is scanned by the trace preprocessor to define our
// Trace function and conversion for kdprint.
//
// begin_wpp config
// FUNC TraceEvents(LEVEL, FLAGS, MSG, …);
// FUNC KdPrint{LEVEL=TRACE_LEVEL_INFORMATION, FLAGS=DBG_INIT}(MSG, …);
// end_wpp
//

Had to manually change them all. After that I was able to generate tmf files. Previously it would compile but made no files.

Honestly, I’d just recommend getting a new host then. You don’t need anything high end,all you need is a free PCIe slot and you’re in business. Probably cost less than the amount of time spent.

-scott
OSR
@OSRDrivers