About DebugPrint() in Disk class driver...

Hi all.

I’m going to make a my own SCSI port driver.(Not Miniport)
There are many interest information wrtten by DebugPrint() in disk.sys and
classpnp.sys source codes.
How can I see the message what DebugPrint() print?

thanks.

Get SoftICE from Numega.

-----Original Message-----
From: jgahn@cs.hongik.ac.kr [SMTP:jgahn@cs.hongik.ac.kr]
Sent: Tuesday, September 19, 2000 1:16 AM
To: NT Developers Interest List
Subject: [ntdev] About DebugPrint() in Disk class driver…

Hi all.

I’m going to make a my own SCSI port driver.(Not Miniport)
There are many interest information wrtten by DebugPrint() in disk.sys and

classpnp.sys source codes.
How can I see the message what DebugPrint() print?

thanks.


You are currently subscribed to ntdev as: xxxxx@eltron.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

I think SoftIce is going to have a problem here. Given that this is a SCSI
driver and can possibly support disk drives, these drivers love to start and
initialize VERY early in the boot process. If SoftIce
Cannot load before this target driver then SoftIce is a waste of money since
you cannot use it to debug what you bought it to debug.

I use WinDbg to work on my SCSI miniport and system bus extender driver, The
bus extender loads BEFORE ScsiPort, since it provides functionality for the
miniport.

-----Original Message-----
From: Chou, Ken [mailto:xxxxx@eltron.com]
Sent: Tuesday, September 19, 2000 8:15 AM
To: NT Developers Interest List
Subject: [ntdev] RE: About DebugPrint() in Disk class
driver…

Get SoftICE from Numega.

-----Original Message-----
> From: jgahn@cs.hongik.ac.kr [SMTP:jgahn@cs.hongik.ac.kr]
> Sent: Tuesday, September 19, 2000 1:16 AM
> To: NT Developers Interest List
> Subject: [ntdev] About DebugPrint() in Disk class
driver…
>
> Hi all.
>
> I’m going to make a my own SCSI port driver.(Not Miniport)
> There are many interest information wrtten by DebugPrint()
in disk.sys and
>
> classpnp.sys source codes.
> How can I see the message what DebugPrint() print?
>
> thanks.
>
> —
> You are currently subscribed to ntdev as: xxxxx@eltron.com
> To unsubscribe send a blank email to
$subst(‘Email.Unsub’)


You are currently subscribed to ntdev as:
xxxxx@delphieng.com
To unsubscribe send a blank email to
$subst(‘Email.Unsub’)

I think there are two versions of DebugPrint. One that maps to
ClassDebugPrint and other ScsiDebugPrint.

You need to have checked build for both of them. Both of them directly call
DbgPrint that is a standard kernel mode function. ClassDebugPrint is located
in the class driver whereas ScsiDebugPrint is located in scsiport (I think).
To use this you need to edit a global variable in scsiport called
‘scsidebug’ or ‘debugprint’ (which one I am not sure). You have to set the
value of this variable to the level of the message you wanted displayed in
your calls to ScsiDebugPrint. Levels are 0, 1, 2… You can use a debugger
like WinDbg or SoftIce to edit the value of this variable. Once again, make
sure that you have checkedbuild of these drivers.

----- Original Message -----
From:
To: “NT Developers Interest List”
Sent: Tuesday, September 19, 2000 8:16 AM
Subject: [ntdev] About DebugPrint() in Disk class driver…

> Hi all.
>
> I’m going to make a my own SCSI port driver.(Not Miniport)
> There are many interest information wrtten by DebugPrint() in disk.sys and
> classpnp.sys source codes.
> How can I see the message what DebugPrint() print?
>
> thanks.
>
> —
> You are currently subscribed to ntdev as: xxxxx@hotmail.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
>
>

Thanks for your help…

I found variable “ULONG ClassDebug” in classpnp\class.c file.
You wrote I can change that variable in WinDbg… How can I change that?

I can’t find scsi port source code in DDK.
Is it possible that change the value just like ClassDebug(PortDebug… I think…)?

thanks again…

----- Original Message -----
From: “Noman Smith”
To: “NT Developers Interest List”
Sent: Wednesday, September 20, 2000 4:17 AM
Subject: [ntdev] Re: About DebugPrint() in Disk class driver…

> I think there are two versions of DebugPrint. One that maps to
> ClassDebugPrint and other ScsiDebugPrint.
>
> You need to have checked build for both of them. Both of them directly call
> DbgPrint that is a standard kernel mode function. ClassDebugPrint is located
> in the class driver whereas ScsiDebugPrint is located in scsiport (I think).
> To use this you need to edit a global variable in scsiport called
> ‘scsidebug’ or ‘debugprint’ (which one I am not sure). You have to set the
> value of this variable to the level of the message you wanted displayed in
> your calls to ScsiDebugPrint. Levels are 0, 1, 2… You can use a debugger
> like WinDbg or SoftIce to edit the value of this variable. Once again, make
> sure that you have checkedbuild of these drivers.
>
>
>
> ----- Original Message -----
> From:
> To: “NT Developers Interest List”
> Sent: Tuesday, September 19, 2000 8:16 AM
> Subject: [ntdev] About DebugPrint() in Disk class driver…
>
>
> > Hi all.
> >
> > I’m going to make a my own SCSI port driver.(Not Miniport)
> > There are many interest information wrtten by DebugPrint() in disk.sys and
> > classpnp.sys source codes.
> > How can I see the message what DebugPrint() print?
> >
> > thanks.
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@hotmail.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
>
> —
> You are currently subscribed to ntdev as: jgahn@cs.hongik.ac.kr
> To unsubscribe send a blank email to xxxxx@lists.osr.com

Hi,

Use the “x” command in WinDbg to resolve the variables address and then use
the “e” command to edit the address.

For eg “x scsiport!*” command will give you address of all the functions and
global variables inside scsiport. Find the one for “scsidebug” (or was it
“debugprint”) and edit that address to change the displayed message level.

Also scsiport code is not available in the DDK (or anywhere else) although
the scsiport symbol is available under the Support directory of the OS
installation CD if you are using NT4 and in the Customer Support Diagnostic
CD if you are using Win2K.

----- Original Message -----
From: “JungGyun Ahn”
To: “NT Developers Interest List”
Sent: Wednesday, September 20, 2000 1:05 AM
Subject: [ntdev] Re: About DebugPrint() in Disk class driver…

> Thanks for your help…
>
> I found variable “ULONG ClassDebug” in classpnp\class.c file.
> You wrote I can change that variable in WinDbg… How can I change that?
>
> I can’t find scsi port source code in DDK.
> Is it possible that change the value just like ClassDebug(PortDebug… I
think…)?
>
>
> thanks again…
>
> ----- Original Message -----
> From: “Noman Smith”
> To: “NT Developers Interest List”
> Sent: Wednesday, September 20, 2000 4:17 AM
> Subject: [ntdev] Re: About DebugPrint() in Disk class driver…
>
>
> > I think there are two versions of DebugPrint. One that maps to
> > ClassDebugPrint and other ScsiDebugPrint.
> >
> > You need to have checked build for both of them. Both of them directly
call
> > DbgPrint that is a standard kernel mode function. ClassDebugPrint is
located
> > in the class driver whereas ScsiDebugPrint is located in scsiport (I
think).
> > To use this you need to edit a global variable in scsiport called
> > ‘scsidebug’ or ‘debugprint’ (which one I am not sure). You have to set
the
> > value of this variable to the level of the message you wanted displayed
in
> > your calls to ScsiDebugPrint. Levels are 0, 1, 2… You can use a
debugger
> > like WinDbg or SoftIce to edit the value of this variable. Once again,
make
> > sure that you have checkedbuild of these drivers.
> >
> >
> >
> > ----- Original Message -----
> > From:
> > To: “NT Developers Interest List”
> > Sent: Tuesday, September 19, 2000 8:16 AM
> > Subject: [ntdev] About DebugPrint() in Disk class driver…
> >
> >
> > > Hi all.
> > >
> > > I’m going to make a my own SCSI port driver.(Not Miniport)
> > > There are many interest information wrtten by DebugPrint() in disk.sys
and
> > > classpnp.sys source codes.
> > > How can I see the message what DebugPrint() print?
> > >
> > > thanks.
> > >
> > > —
> > > You are currently subscribed to ntdev as: xxxxx@hotmail.com
> > > To unsubscribe send a blank email to $subst(‘Email.Unsub’)
> > >
> > >
> >
> > —
> > You are currently subscribed to ntdev as: jgahn@cs.hongik.ac.kr
> > To unsubscribe send a blank email to $subst(‘Email.Unsub’)
> b‹­ç®·¶\¹»?vÚµ??©š+†‹j)¢d?n?·zwnV‘é?•æz{zýÛaŠË¢Ê

The easiest way to set the variable is (eg):

ed scsiport!scsidebug 3

You’ll need, as stated previously, the checked version of scsiport and the
checked symbols so that windbg can find the variable. Also note that it is
possible to put the scsidebug entry in the registry at the
miniport\parameters location.

Regards,

Paul Bunn, UltraBac.com, 425-644-6000
Microsoft MVP - WindowsNT/2000
http://www.ultrabac.com

-----Original Message-----
From: Noman Smith [mailto:xxxxx@hotmail.com]
Sent: Wednesday, September 20, 2000 11:04 AM
To: NT Developers Interest List
Cc: jgahn@cs.hongik.ac.kr
Subject: [ntdev] Re: About DebugPrint() in Disk class driver…

Hi,

Use the “x” command in WinDbg to resolve the variables address and then use
the “e” command to edit the address.

For eg “x scsiport!*” command will give you address of all the functions and
global variables inside scsiport. Find the one for “scsidebug” (or was it
“debugprint”) and edit that address to change the displayed message level.

Also scsiport code is not available in the DDK (or anywhere else) although
the scsiport symbol is available under the Support directory of the OS
installation CD if you are using NT4 and in the Customer Support Diagnostic
CD if you are using Win2K.

Thanks Paul and Noman…

Another Question… Would you?

In miniport\parameters registry key…
Which type do I use when insert ScsiDebug value…
I selected DWORD value, but It did not work.

I think this question will be final question for DebugPrint()… ^.^

----- Original Message -----
From: “Paul Bunn”
To: “NT Developers Interest List”
Cc:
Sent: Thursday, September 21, 2000 7:26 AM
Subject: [ntdev] Re: About DebugPrint() in Disk class driver…

> The easiest way to set the variable is (eg):
>
> ed scsiport!scsidebug 3
>
> You’ll need, as stated previously, the checked version of scsiport and the
> checked symbols so that windbg can find the variable. Also note that it is
> possible to put the scsidebug entry in the registry at the
> miniport\parameters location.
>
> Regards,
>
> Paul Bunn, UltraBac.com, 425-644-6000
> Microsoft MVP - WindowsNT/2000
> http://www.ultrabac.com
>
>
> -----Original Message-----
> From: Noman Smith [mailto:xxxxx@hotmail.com]
> Sent: Wednesday, September 20, 2000 11:04 AM
> To: NT Developers Interest List
> Cc: jgahn@cs.hongik.ac.kr
> Subject: [ntdev] Re: About DebugPrint() in Disk class driver…
>
>
> Hi,
>
> Use the “x” command in WinDbg to resolve the variables address and then use
> the “e” command to edit the address.
>
> For eg “x scsiport!*” command will give you address of all the functions and
> global variables inside scsiport. Find the one for “scsidebug” (or was it
> “debugprint”) and edit that address to change the displayed message level.
>
> Also scsiport code is not available in the DDK (or anywhere else) although
> the scsiport symbol is available under the Support directory of the OS
> installation CD if you are using NT4 and in the Customer Support Diagnostic
> CD if you are using Win2K.
>
> —
> You are currently subscribed to ntdev as: jgahn@cs.hongik.ac.kr
> To unsubscribe send a blank email to xxxxx@lists.osr.com

For all instances of the Adaptec 2940 driver (aic78xx) as an example:

HKLM\system\currrentcontrolset\setvices\aic78xx\parameters\device
ScsiDebug:REG_DWORD

Regards,

Paul Bunn, UltraBac.com, 425-644-6000
Microsoft MVP - WindowsNT/2000
http://www.ultrabac.com

-----Original Message-----
From: JungGyun Ahn [mailto:jgahn@cs.hongik.ac.kr]
Sent: Thursday, September 21, 2000 4:57 AM
To: NT Developers Interest List
Subject: [ntdev] Re: About DebugPrint() in Disk class driver…

Thanks Paul and Noman…

Another Question… Would you?

In miniport\parameters registry key…
Which type do I use when insert ScsiDebug value…
I selected DWORD value, but It did not work.

I think this question will be final question for DebugPrint()… ^.^

----- Original Message -----
From: “Paul Bunn”
To: “NT Developers Interest List”
Cc:
Sent: Thursday, September 21, 2000 7:26 AM
Subject: [ntdev] Re: About DebugPrint() in Disk class driver…

> The easiest way to set the variable is (eg):
>
> ed scsiport!scsidebug 3
>
> You’ll need, as stated previously, the checked version of scsiport and the
> checked symbols so that windbg can find the variable. Also note that it
is
> possible to put the scsidebug entry in the registry at the
> miniport\parameters location.

The registry value is a DWORD. I think it will work only on a checked build
version of scsiport. So either install a checked build version of NT or I
don’t know if this works, you can copy the scsiport.sys from a checked
build version of NT to your free build machine.

----- Original Message -----
From: “JungGyun Ahn”
To: “NT Developers Interest List”
Sent: Thursday, September 21, 2000 4:56 AM
Subject: [ntdev] Re: About DebugPrint() in Disk class driver…

> Thanks Paul and Noman…
>
> Another Question… Would you?
>
> In miniport\parameters registry key…
> Which type do I use when insert ScsiDebug value…
> I selected DWORD value, but It did not work.
>
> I think this question will be final question for DebugPrint()… ^.^
>
>
>
> ----- Original Message -----
> From: “Paul Bunn”
> To: “NT Developers Interest List”
> Cc:
> Sent: Thursday, September 21, 2000 7:26 AM
> Subject: [ntdev] Re: About DebugPrint() in Disk class driver…
>
>
> > The easiest way to set the variable is (eg):
> >
> > ed scsiport!scsidebug 3
> >
> > You’ll need, as stated previously, the checked version of scsiport and
the
> > checked symbols so that windbg can find the variable. Also note that it
is
> > possible to put the scsidebug entry in the registry at the
> > miniport\parameters location.
> >
> > Regards,
> >
> > Paul Bunn, UltraBac.com, 425-644-6000
> > Microsoft MVP - WindowsNT/2000
> > http://www.ultrabac.com
> >
> >
> > -----Original Message-----
> > From: Noman Smith [mailto:xxxxx@hotmail.com]
> > Sent: Wednesday, September 20, 2000 11:04 AM
> > To: NT Developers Interest List
> > Cc: jgahn@cs.hongik.ac.kr
> > Subject: [ntdev] Re: About DebugPrint() in Disk class driver…
> >
> >
> > Hi,
> >
> > Use the “x” command in WinDbg to resolve the variables address and then
use
> > the “e” command to edit the address.
> >
> > For eg “x scsiport!*” command will give you address of all the functions
and
> > global variables inside scsiport. Find the one for “scsidebug” (or was
it
> > “debugprint”) and edit that address to change the displayed message
level.
> >
> > Also scsiport code is not available in the DDK (or anywhere else)
although
> > the scsiport symbol is available under the Support directory of the OS
> > installation CD if you are using NT4 and in the Customer Support
Diagnostic
> > CD if you are using Win2K.
> >
> > —
> > You are currently subscribed to ntdev as: jgahn@cs.hongik.ac.kr
> > To unsubscribe send a blank email to $subst(‘Email.Unsub’)
> b?¶¹®vµj™š†j¢ºn‰zn‘Š•zz?