Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"right way" to disable DbgPrint

216 views
Skip to first unread message

Strauss

unread,
Sep 18, 2003, 10:20:40 AM9/18/03
to

Is there a way to disable DbgPrint? Debug version of our drivers send a
LOT of output, and it becomes impossible to use Windbg via serial. 30
minutes to boot (not kidding). The other guys use SoftIce, they don't
have this problem.
I have my solution, but I don't think it's the "right way":

kd> A nt!DbgPrint
80455d78 RET

Put a RET as the first instruction. DbgPrint is __cdecl, then it
doesn't need to touch the stack (the parameters part). It stops.
Is there a "Microsoft recommended way"?


Strauss

Strauss

unread,
Sep 18, 2003, 10:33:00 AM9/18/03
to

Alan Adams

unread,
Sep 19, 2003, 1:35:23 PM9/19/03
to
Just general ideas & things I've done or seen:

Implement a debug level control within your driver that you can
configure on the fly (either by changing a variable under the
debugger, or a more sophisticated interface). i.e. You won't be
getting DbgPrint output from your driver because you're not calling
DbgPrint, until you're ready to start seeing the output. This way
you're also not disabling DbgPrint for other drivers.

Use XP or later & a 1394 interface. i.e. Dispense with the serial
speed bottleneck.

Andre Vachon [MS]

unread,
Sep 20, 2003, 6:13:13 AM9/20/03
to
If you are running windows server 2003 on the target machine, you can use
kdbgctrl.exe (ships with the debugges) to disable (and reenable) the
dbgprints on the target machine. This required an OS change so the tool does
not work on earlier OSes.

See the debugger docs for more details.

-Andre

"Strauss" <str...@microsoft.com> wrote in message
news:3F69C21C...@microsoft.com...

0 new messages