DbgPrintLog

One of my challenges in getting started with driver development is the expense of acquiring the debugging tools. Several options are available, but they all involve writing someone a check, and now is not a really great time for that. Enter DbgPrintLog.

I found a tool at http://alter.org.ua called DbgPrintLog that intercepts the API entry point for DbgPrint() and redirects the data to a log file. It seems to me to work very nicely as a “poor boy’s tracer”. I have no personal relationship with the author, and no benefit accrues to me for mentioning this. If anyone has an obvious reason why I shouldn’t be using this pending acquring the “real” tools, I’d love to hear it.

WinDbg (http://www.microsoft.com/whdc/devtools/debugging) is available free of charge and is the supported solution for performing kernel debugging.

  • S

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@daryllee.com
Sent: Thursday, October 09, 2008 5:37 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] DbgPrintLog

One of my challenges in getting started with driver development is the expense of acquiring the debugging tools. Several options are available, but they all involve writing someone a check, and now is not a really great time for that. Enter DbgPrintLog.

I found a tool at http://alter.org.ua called DbgPrintLog that intercepts the API entry point for DbgPrint() and redirects the data to a log file. It seems to me to work very nicely as a “poor boy’s tracer”. I have no personal relationship with the author, and no benefit accrues to me for mentioning this. If anyone has an obvious reason why I shouldn’t be using this pending acquring the “real” tools, I’d love to hear it.


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

WPP will assist you well(it can write the debug information to log file with
little performance decrease), but just a bit complex for a small project.

2008/10/10 Skywing

> WinDbg (http://www.microsoft.com/whdc/devtools/debugging) is available
> free of charge and is the supported solution for performing kernel
> debugging.
>
> - S
>
> -----Original Message-----
> From: xxxxx@lists.osr.com [mailto:
> xxxxx@lists.osr.com] On Behalf Of xxxxx@daryllee.com
> Sent: Thursday, October 09, 2008 5:37 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] DbgPrintLog
>
> One of my challenges in getting started with driver development is the
> expense of acquiring the debugging tools. Several options are available,
> but they all involve writing someone a check, and now is not a really great
> time for that. Enter DbgPrintLog.
>
>
> I found a tool at http://alter.org.ua called DbgPrintLog that intercepts
> the API entry point for DbgPrint() and redirects the data to a log file. It
> seems to me to work very nicely as a “poor boy’s tracer”. I have no
> personal relationship with the author, and no benefit accrues to me for
> mentioning this. If anyone has an obvious reason why I shouldn’t be using
> this pending acquring the “real” tools, I’d love to hear it.
>
> —
> 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
>
> —
> 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
>

Thanks. I have not yet figured out how to make WinDbg work on a local machine running a retail version of the OS. All the documentation I can find wants me to put a checked version of the OS on a separate machine. (One article explains how to use VMWare, but the test OS still needs to be a checked version.) Maybe I’m doing something wrong?

I used WPP for a while, but I like the usage pattern of DbgPrintLog much better. But then, see the next sentence.

I know these questions sound like they’re coming from a total doofus, but that’s what I feel like sometimes. This is one of those times.

You need two machines (or a separate target VM) for WinDbg. WinDbg runs on one machine, and the target you are debugging is an entirely separate machine (or VM).

Kernel debugging is fully supported on both free and checked builds, so you should not notice any differences there. (Debugging certain problems may, of course, be easier on checked builds due to additional error checking that may catch an issue earlier on.)

If you are not debugging a driver for some piece of physical hardware, then kernel debugging a VM is likely going to be the most convenient option. There are a number of freely available virtualization suites at this point.

  • S

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@daryllee.com
Sent: Monday, October 13, 2008 1:21 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] DbgPrintLog

Thanks. I have not yet figured out how to make WinDbg work on a local machine running a retail version of the OS. All the documentation I can find wants me to put a checked version of the OS on a separate machine. (One article explains how to use VMWare, but the test OS still needs to be a checked version.) Maybe I’m doing something wrong?

I used WPP for a while, but I like the usage pattern of DbgPrintLog much better. But then, see the next sentence.

I know these questions sound like they’re coming from a total doofus, but that’s what I feel like sometimes. This is one of those times.


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

Forget local debugging it does nothing for you. You do not need the checked
build of the OS, though having it on a test system is a good idea since it
helps find bugs. You do need two systems or two virtual machines. You can
do the two virtual machines if the driver is not for real hardware.


Don Burn (MVP, Windows DDK)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

wrote in message news:xxxxx@ntdev…
> Thanks. I have not yet figured out how to make WinDbg work on a local
> machine running a retail version of the OS. All the documentation I can
> find wants me to put a checked version of the OS on a separate machine.
> (One article explains how to use VMWare, but the test OS still needs to be
> a checked version.) Maybe I’m doing something wrong?
>
> I used WPP for a while, but I like the usage pattern of DbgPrintLog much
> better. But then, see the next sentence.
>
> I know these questions sound like they’re coming from a total doofus, but
> that’s what I feel like sometimes. This is one of those times.
>

Thanks for the feedback. I’ve been in software development for a long time, but Windows driver development is like nothing I’ve ever done before. Your help is appreciated.