Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.3 KiB

  1. //==========================================================================;
  2. //
  3. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  4. // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  5. // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  6. // PURPOSE.
  7. //
  8. // Copyright (c) 1992 - 1999 Microsoft Corporation. All Rights Reserved.
  9. //
  10. //==========================================================================;
  11. #ifndef __CAPDEBUG_H
  12. #define __CAPDEBUG_H
  13. #if DBG
  14. // Debug Logging
  15. // 0 = Errors only
  16. // 1 = Info, stream state changes, stream open close
  17. // 2 = Verbose trace
  18. extern ULONG gDebugLevel;
  19. # define DbgKdPrint(x) KdPrint(x)
  20. # define DbgLogError(x) do { if( (gDebugLevel > 0) || (gDebugLevel == 0)) KdPrint(x); } while (0)
  21. # define DbgLogInfo(x) do { if( gDebugLevel >= 1) KdPrint(x); } while (0)
  22. # define DbgLogTrace(x) do { if( gDebugLevel >= 2) KdPrint(x); } while (0)
  23. # ifdef _X86_
  24. # define TRAP __asm { int 3 }
  25. # else //_X86_
  26. # define TRAP KdBreakPoint()
  27. # endif //_X86_
  28. #else //DBG
  29. # define DbgKdPrint(x)
  30. # define DbgLogError(x)
  31. # define DbgLogInfo(x)
  32. # define DbgLogTrace(x)
  33. # define TRAP
  34. #endif //DBG
  35. #endif // #ifndef __CAPDEBUG_H