views:

249

answers:

3

Debug Messages from the Windows Kernel Drivers?

I am using DbgPrint and DebugView currently, but it this the official way to observe the drivers behaviour? Does anybody know if and where kernel log files are hidden in the Windows System (like /var/log and dmesg only windows-ish?)

I for my part are currently using Vista, but there probably is some standard or hidden way of logging which is much older but still valid.

+1  A: 

The equivalent of /var/log is the Event Log but you can't use it for drivers because that would be too slow.

Aaron Digulla
+1  A: 

There is an API for the event log in kernel mode.

See IoAllocateErrorLogEntry and IoWriteErrorLogEntry.

I don't know if they are slow or fast.

You should use DbgPrint for trace calls and use WinDbg from the Windows kernel debugging tools for debugging your drivers. WinDbg is a really good debugger, which will help you greatly.

PS: this is not hidden in any way. See the WDK documentation for details.

Christopher
knowing the right terms to search for is halfways there. thanks.
Don Johe
+1  A: 
Taneli Waltari