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.

91 lines
1.9 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. SsDebug.h
  5. Abstract:
  6. Header file for various server service debugging aids.
  7. Author:
  8. David Treadwell (davidtr) 10-Jan-1991
  9. Revision History:
  10. --*/
  11. #ifndef _SSDEBUG_
  12. #define _SSDEBUG_
  13. #if DBG
  14. #ifndef SSDEBUG_DEFAULT
  15. #define SSDEBUG_DEFAULT 0
  16. #endif
  17. #define DEBUG_INITIALIZATION 0x00000001
  18. #define DEBUG_INITIALIZATION_ERRORS 0x00000002
  19. #define DEBUG_TERMINATION 0x00000004
  20. #define DEBUG_TERMINATION_ERRORS 0x00000008
  21. #define DEBUG_API_ERRORS 0x00000010
  22. #define DEBUG_FS_CONTROL 0x00000020
  23. #define DEBUG_REGISTRY 0x00000040
  24. #define DEBUG_8 0x00000080
  25. #define DEBUG_ANNOUNCE 0x00000100
  26. #define DEBUG_CONTROL_MESSAGES 0x00000200
  27. #define DEBUG_11 0x00000400
  28. #define DEBUG_12 0x00000800
  29. #define DEBUG_SECURITY 0x00001000
  30. #define DEBUG_ACCESS_DENIED 0x00002000
  31. #define DEBUG_INITIALIZATION_BREAKPOINT 0x00004000
  32. #define DEBUG_TERMINATION_BREAKPOINT 0x00008000
  33. extern ULONG SsDebug;
  34. #define DEBUG if ( TRUE )
  35. #define IF_DEBUG(flag) if (SsDebug & (DEBUG_ ## flag))
  36. VOID
  37. SsPrintf (
  38. char *Format,
  39. ...
  40. );
  41. #ifdef USE_DEBUGGER
  42. #define SS_PRINT(args) DbgPrint args
  43. #else
  44. #define SS_PRINT(args)
  45. //#define SS_PRINT(args) SsPrintf args
  46. #endif
  47. #ifdef USE_DEBUGGER
  48. #define SS_ASSERT(exp) ASSERT(exp)
  49. #else
  50. VOID
  51. SsAssert(
  52. IN PVOID FailedAssertion,
  53. IN PVOID FileName,
  54. IN ULONG LineNumber
  55. );
  56. #define SS_ASSERT(exp) if (!(exp)) SsAssert( #exp, __FILE__, __LINE__ )
  57. #endif
  58. #else
  59. #define DEBUG if ( FALSE )
  60. #define IF_DEBUG(flag) if (FALSE)
  61. #define SS_PRINT(args)
  62. #define SS_ASSERT(exp)
  63. #endif
  64. #endif // ndef _SSDEBUG_