Why there is no messages printed in windbg?
I called the KdPrint((“Toaster Function Driver Sample - Driver Framework Edition.\n”)); to displayed in windbg.
My target PC is win2008, I have modified the Registry as below:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Debug Print Filter] “DEFAULT”=dword:00000008
But if I use the KdPrintEx, the information can be displayed in winDbg.
Did you try reading the WDK docs for KdPrintEx, DbgPrintEx KdPrint and
DbgPrint? I agree that the information is a bit scattered, but it is all
there.
The behavior of KdPrint in vista and later releases is by design.
Mark Roddy
On Wed, Jun 2, 2010 at 4:33 AM, wrote:
> Why there is no messages printed in windbg?
>
> I called the KdPrint((“Toaster Function Driver Sample - Driver Framework
> Edition.\n”)); to displayed in windbg.
>
> My target PC is win2008, I have modified the Registry as below:
>
> [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Debug
> Print Filter] “DEFAULT”=dword:00000008
>
>
> But if I use the KdPrintEx, the information can be displayed in winDbg.
>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
Did you try bcdedit to set the machine into debugging mode? I think that is required. Also, this might be silly but are you using checked build?
-Chakri
“Mark Roddy” wrote in message news:xxxxx@ntdev…
Did you try reading the WDK docs for KdPrintEx, DbgPrintEx KdPrint and DbgPrint? I agree that the information is a bit scattered, but it is all there.
The behavior of KdPrint in vista and later releases is by design.
Mark Roddy
On Wed, Jun 2, 2010 at 4:33 AM, wrote:
Why there is no messages printed in windbg?
I called the KdPrint((“Toaster Function Driver Sample - Driver Framework Edition.\n”)); to displayed in windbg.
My target PC is win2008, I have modified the Registry as below:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Debug Print Filter] “DEFAULT”=dword:00000008
But if I use the KdPrintEx, the information can be displayed in winDbg.
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
Jeff, which level you use with KdPrintEx?
If you want all severity levels from WARNING up,
set the filter value to OR of all bits from
DPFLTR_INFO_LEVEL to DPFLTR_ERROR_LEVEL,
that is, 1|2|4|8 = 0xF.
Agree with Mark, the documentation on DbgPrint… and filtering is not clear
enough (including the given examples) and could use some editing.
Debug prints are among first things that beginner developer reads about.
It should not be confusing a bit.
By the way, the OSR SetDbgPrintFiltering utility
displays a message “Set the value … to 8 to
enable xxx_INFO_LEVEL output as well as
xxx_ERROR_LEVEL output”.
This seems to be wrong - it just writes
the entered value to the registry as is, it will
not add the higher levels bits.
And the filter values in registry are copied to Kd_xxx_Mask variables
exactly as is. Values less than 32 are not interpreted as bit numbers.
Regards,
– pa
Thanks Mark ,Chakradhar and Pavel .I have read WDK docs for KdPrintEx, DbgPrintEx KdPrint and
DbgPrint, and already tried bcdedit to set the machine into debugging mode.
Pavel , I use the DPFLTR_MASK level ,the KdPrintEx and DbgPrintEx are OK.
For example:
KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_MASK|0x1000|0x4,…))
Pavel , your means is that the filter values in registry is wrong?
Yes this is what I mean. Exactly.
If your filter in the registry is 0x8, then (1<<31) | 0x1000|0x4 won’t match it.
– pa