Hi,

DbgPrint is not available for SCSI miniports. I am unable to get
DebugPrint messages at WinDbg. Any suggestions on how to get debug
prints out of a SCSI miniport driver. Thanks in advance.

vs

Re: Debug Printing from SCSI miniport by Gary

Gary
Thu Aug 03 09:21:35 CDT 2006

You have to be load the checked build for SCSIPORT, which if you are not
using the the full checked build means you will have replace the current
SCSIPORT with the checked build version. Given you have WinDbg connected and
disable SFP, you should then get the spew you are wanting.

--
The personal opinion of
Gary G. Little

"vs" <windrv@gmail.com> wrote in message
news:1154507414.206463.261910@i42g2000cwa.googlegroups.com...
> Hi,
>
> DbgPrint is not available for SCSI miniports. I am unable to get
> DebugPrint messages at WinDbg. Any suggestions on how to get debug
> prints out of a SCSI miniport driver. Thanks in advance.
>
> vs
>



Re: Debug Printing from SCSI miniport by Mark

Mark
Thu Aug 03 16:14:56 CDT 2006

Gary G. Little wrote:
> You have to be load the checked build for SCSIPORT, which if you are not
> using the the full checked build means you will have replace the current
> SCSIPORT with the checked build version. Given you have WinDbg connected and
> disable SFP, you should then get the spew you are wanting.
>
The other option is to build a separate static library using the normal
DDK and have wrappers for DebugPrint that you can call from your
miniport. Then just link your miniport with your helper library.

Re: Debug Printing from SCSI miniport by vs

vs
Fri Aug 04 09:01:11 CDT 2006

Thanks !. I created a separate translation unit with a print function
wrapper as below as suggested. Also had to change the sources to make
TARGETTYPE as DRIVER instead of MINIPORT to get it to resolve and link.

#include "ntddk.h"
#include "strsafe.h"
VOID myDbgPrint(PCCHAR str, ...)
{
UCHAR pbfr[128];
va_list ap;
va_start(ap, str);
StringCbVPrintf(pbfr, 128, str, ap);
DbgPrint(pbfr);
va_end(ap);
return;
}

Thanks again for the suggestions.

regards
vs