The information in this article applies to:
SUMMARY
Each device driver uses its own method for debug printing. There are
things that each method will have in common.
In the SCSI drivers, if DBG is defined, then debug printing can be used (checked build). If DBG is not defined, then debug printing is not used (free build).
The messages that can be printed are classified by level, 0 being the lowest level, 3 being the highest level. When a call is made to the debug printing routine, the first variable is a message level and the second variable is a message string.
The debug printing routine compares the message level with a global variable (defined by the device driver) that sets the current message level that can be printed. If the message level is acceptable, the message string is printed. The comparison method varies between drivers. For example, messages from SCSI drivers are printed if they are less than or equal to the current message level. The AT disk controller performs an ORing operation to determine if the message is printable. The following mechanism is used by the COM driver
MORE INFORMATION
For the COM driver, the global variable used to store the current
message level is SerialDebugLevel. See INITUNLO.C to examine this
variable's usage. For the AT ESDI disk driver, the variable used is
AtDebugLevel. See ATDISK.C for this variables usage. The global variable
for SCSI drivers is ScsiDebug. All of these variables (SerialDebugLevel,
AtDebugLevel and ScsiDebug) have a default value of 0 and could be
modified to produce more debugging output.
Keywords : NTDDKDebug |
Last Reviewed: March 2, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |