ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

debug.h
Go to the documentation of this file.
00001 /*++
00002 
00003 Copyright (C) Microsoft Corporation, 1991 - 1999
00004 
00005 Module Name:
00006 
00007     debug.h
00008 
00009 Abstract:
00010 
00011 
00012 Author:
00013 
00014 Environment:
00015 
00016     kernel mode only
00017 
00018 Notes:
00019 
00020 
00021 Revision History:
00022 
00023 --*/
00024 
00025 
00026 VOID ClassDebugPrint(CLASS_DEBUG_LEVEL DebugPrintLevel, PCCHAR DebugMessage, ...);
00027 
00028 #if DBG
00029 
00030     typedef struct _CLASSPNP_GLOBALS {
00031 
00032         //
00033         // whether or not to ASSERT for lost irps
00034         //
00035 
00036         ULONG BreakOnLostIrps;
00037         ULONG SecondsToWaitForIrps;
00038 
00039         //
00040         // use a buffered debug print to help
00041         // catch timing issues that do not
00042         // reproduce with std debugprints enabled
00043         //
00044 
00045         ULONG UseBufferedDebugPrint;
00046         ULONG UseDelayedRetry;
00047 
00048         //
00049         // the next four are the buffered printing support
00050         // (currently unimplemented) and require the spinlock
00051         // to use
00052         //
00053 
00054         ULONG Index;                // index into buffer
00055         KSPIN_LOCK SpinLock;
00056         PUCHAR Buffer;              // requires spinlock to access
00057         ULONG NumberOfBuffers;      // number of buffers available
00058         SIZE_T EachBufferSize;      // size of each buffer
00059 
00060         //
00061         // interlocked variables to initialize
00062         // this data only once
00063         //
00064 
00065         LONG Initializing;
00066         LONG Initialized;
00067 
00068     } CLASSPNP_GLOBALS, *PCLASSPNP_GLOBALS;
00069 
00070     #define DBGTRACE(dbgTraceLevel, args_in_parens)                                \
00071         if (ClassDebug & (1 << (dbgTraceLevel+15))){                                               \
00072             DbgPrint("CLASSPNP> *** TRACE *** (file %s, line %d)\n", __FILE__, __LINE__ ); \
00073             DbgPrint("    >  "); \
00074             DbgPrint args_in_parens; \
00075             DbgPrint("\n"); \
00076             if (DebugTrapOnWarn && (dbgTraceLevel == ClassDebugWarning)){ \
00077                 DbgBreakPoint();  \
00078             } \
00079         }
00080     #define DBGWARN(args_in_parens)                                \
00081         {                                               \
00082             DbgPrint("CLASSPNP> *** WARNING *** (file %s, line %d)\n", __FILE__, __LINE__ ); \
00083             DbgPrint("    >  "); \
00084             DbgPrint args_in_parens; \
00085             DbgPrint("\n"); \
00086             if (DebugTrapOnWarn){ \
00087                 DbgBreakPoint();  \
00088             } \
00089         }
00090     #define DBGERR(args_in_parens)                                \
00091         {                                               \
00092             DbgPrint("CLASSPNP> *** ERROR *** (file %s, line %d)\n", __FILE__, __LINE__ ); \
00093             DbgPrint("    >  "); \
00094             DbgPrint args_in_parens; \
00095             DbgPrint("\n"); \
00096             DbgBreakPoint();                            \
00097         }
00098     #define DBGTRAP(args_in_parens)                                \
00099         {                                               \
00100             DbgPrint("CLASSPNP> *** COVERAGE TRAP *** (file %s, line %d)\n", __FILE__, __LINE__ ); \
00101             DbgPrint("    >  "); \
00102             DbgPrint args_in_parens; \
00103             DbgPrint("\n"); \
00104             DbgBreakPoint();                            \
00105         }
00106 
00107 
00108     #define DBGGETIOCTLSTR(_ioctl) DbgGetIoctlStr(_ioctl)
00109     #define DBGGETSCSIOPSTR(_pSrb) DbgGetScsiOpStr(_pSrb)
00110     #define DBGGETSENSECODESTR(_pSrb) DbgGetSenseCodeStr(_pSrb)
00111     #define DBGGETADSENSECODESTR(_pSrb) DbgGetAdditionalSenseCodeStr(_pSrb)
00112     #define DBGGETADSENSEQUALIFIERSTR(_pSrb) DbgGetAdditionalSenseCodeQualifierStr(_pSrb)
00113     #define DBGCHECKRETURNEDPKT(_pkt) DbgCheckReturnedPkt(_pkt)
00114     #define DBGGETSRBSTATUSSTR(_pSrb) DbgGetSrbStatusStr(_pSrb)
00115     
00116     VOID ClasspInitializeDebugGlobals(VOID);
00117     char *DbgGetIoctlStr(ULONG ioctl);
00118     char *DbgGetScsiOpStr(PSCSI_REQUEST_BLOCK Srb);
00119     char *DbgGetSenseCodeStr(PSCSI_REQUEST_BLOCK Srb);
00120     char *DbgGetAdditionalSenseCodeStr(PSCSI_REQUEST_BLOCK Srb);
00121     char *DbgGetAdditionalSenseCodeQualifierStr(PSCSI_REQUEST_BLOCK Srb);
00122     VOID DbgCheckReturnedPkt(TRANSFER_PACKET *Pkt);
00123     char *DbgGetSrbStatusStr(PSCSI_REQUEST_BLOCK Srb);
00124 
00125 
00126     extern CLASSPNP_GLOBALS ClasspnpGlobals;
00127     extern LONG ClassDebug;
00128     extern BOOLEAN DebugTrapOnWarn;
00129 
00130 #else
00131 
00132     #define ClasspInitializeDebugGlobals()
00133     #define DBGWARN(args_in_parens)                                
00134     #define DBGERR(args_in_parens)                                
00135     #define DBGTRACE(dbgTraceLevel, args_in_parens)                                
00136     #define DBGTRAP(args_in_parens)
00137     
00138     #define DBGGETIOCTLSTR(_ioctl)
00139     #define DBGGETSCSIOPSTR(_pSrb)
00140     #define DBGGETSENSECODESTR(_pSrb)    
00141     #define DBGGETADSENSECODESTR(_pSrb)
00142     #define DBGGETADSENSEQUALIFIERSTR(_pSrb)
00143     #define DBGCHECKRETURNEDPKT(_pkt)
00144     #define DBGGETSRBSTATUSSTR(_pSrb)
00145     
00146 #endif
00147 
00148 

Generated on Sun May 27 2012 04:17:46 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.