Question

I'm debugging KmdfSmall driver installed on target VM by using VS2012 which is on Host.

But, Debugger Immediate Window' in VS 2012 on host not printing any msg.

Here I'm using KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_INFO_LEVEL, "\n KmdfSmallEvtDeviceAdd has been called\n")) as it is given in msdn.

I updated the value of flag as well as described in OSRonline .

"HKLM\SYSTEM\CCS\Control\Session Manager\Debug Print Filter". Under this key, created a value with the name "DEFAULT" and Set the value of this key equal to the DWORD value 0xf".

But nothing changed. Might be I'm looking on wrong place for "KdPrintEx" msg o/p. One thing is clear return value of KdPrintEx is correct i.e. STATUS_SUCCESS. I've checked it.

So, please let me know where do i am wrong. Regards matt

Was it helpful?

Solution

changed the value of Component Filter Mask on target machine where driver has been installed to debug. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Debug Print Filter.

Under this key, created a value with the name "IHVDRIVER" and Set the value of this key equal to the DWORD value 0x8".

I choose "IHVDRIVER" because in my KdPrintEx((DPFLTR_"IHVDRIVER"_ID, DPFLTR_INFO_LEVEL, "\n KmdfSmallEvtDeviceAdd has been called\n")) And DWORD value 0x8 because Leveling.

For detail: http://msdn.microsoft.com/en-us/library/windows/hardware/ff551519(v=vs.85).aspx

thanks you

regards matt

OTHER TIPS

KdPrintEx needs more values. You may use this:

KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL, STR));

STR is a PSTR, you can directly replace it with "lakr amazing!" "balalal"

Also you can have this function:

VOID LakrPrint(PCSTR STR) {
KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL, STR));}

Call it like:

LakrPrint("Hello World!");

Best wishes.

// The method to use regedit may have a lot more useless output.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top