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.

121 lines
3.4 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows NT **/
  3. /** Copyright(c) Microsoft Corp., 1993 **/
  4. /**********************************************************************/
  5. /*
  6. debug.h
  7. This file contains a number of debug-dependent definitions for
  8. the WINS Service.
  9. FILE HISTORY:
  10. Pradeepb 07-Mar-1993 Created.
  11. */
  12. #ifndef _DEBUG_H_
  13. #define _DEBUG_H_
  14. #include <stdio.h>
  15. #include <stdlib.h>
  16. #include <nt.h>
  17. #include <ntrtl.h>
  18. #include <nturtl.h>
  19. #include <windows.h>
  20. #if DBG
  21. //
  22. // Debug output control flags.
  23. //
  24. #define WINSD_DEBUG_ENTRYPOINTS 0x00000001L // DLL entrypoints
  25. #define WINSD_DEBUG_OPEN 0x00000002L // OpenPerformanceData
  26. #define WINSD_DEBUG_CLOSE 0x00000004L // CollectPerformanceData
  27. #define WINSD_DEBUG_COLLECT 0x00000008L // ClosePerformanceData
  28. // #define WINSD_DEBUG_ 0x00000010L
  29. // #define WINSD_DEBUG_ 0x00000020L
  30. // #define WINSD_DEBUG_ 0x00000040L
  31. // #define WINSD_DEBUG_ 0x00000080L
  32. // #define WINSD_DEBUG_ 0x00000100L
  33. // #define WINSD_DEBUG_ 0x00000200L
  34. // #define WINSD_DEBUG_ 0x00000400L
  35. // #define WINSD_DEBUG_ 0x00000800L
  36. // #define WINSD_DEBUG_ 0x00001000L
  37. // #define WINSD_DEBUG_ 0x00002000L
  38. // #define WINSD_DEBUG_ 0x00004000L
  39. // #define WINSD_DEBUG_ 0x00008000L
  40. // #define WINSD_DEBUG_ 0x00010000L
  41. // #define WINSD_DEBUG_ 0x00020000L
  42. // #define WINSD_DEBUG_ 0x00040000L
  43. // #define WINSD_DEBUG_ 0x00080000L
  44. // #define WINSD_DEBUG_ 0x00100000L
  45. // #define WINSD_DEBUG_ 0x00200000L
  46. // #define WINSD_DEBUG_ 0x00400000L
  47. // #define WINSD_DEBUG_ 0x00800000L
  48. // #define WINSD_DEBUG_ 0x01000000L
  49. // #define WINSD_DEBUG_ 0x02000000L
  50. // #define WINSD_DEBUG_ 0x04000000L
  51. // #define WINSD_DEBUG_ 0x08000000L
  52. // #define WINSD_DEBUG_ 0x10000000L
  53. // #define WINSD_DEBUG_ 0x20000000L
  54. #define WINSD_DEBUG_OUTPUT_TO_DEBUGGER 0x40000000L
  55. // #define WINSD_DEBUG_ 0x80000000L
  56. extern DWORD WinsdDebug;
  57. #define IF_DEBUG(flag) if ( (WinsdDebug & WINSD_DEBUG_ ## flag) != 0 )
  58. //
  59. // Debug output function.
  60. //
  61. VOID WinsdPrintf( CHAR * pszFormat,
  62. ... );
  63. #define WINSD_PRINT(args) WinsdPrintf args
  64. //
  65. // Assert & require.
  66. //
  67. VOID WinsdAssert( VOID * pAssertion,
  68. VOID * pFileName,
  69. ULONG nLineNumber );
  70. #define WINSD_ASSERT(exp) if (!(exp)) WinsdAssert( #exp, __FILE__, __LINE__ )
  71. #define WINSD_REQUIRE WINSD_ASSERT
  72. #else // !DBG
  73. //
  74. // No debug output.
  75. //
  76. #define IF_DEBUG(flag) if (0)
  77. //
  78. // Null debug output function.
  79. //
  80. #define WINSD_PRINT(args)
  81. //
  82. // Null assert & require.
  83. //
  84. #define WINSD_ASSERT(exp)
  85. #define WINSD_REQUIRE(exp) ((VOID)(exp))
  86. #endif // DBG
  87. #endif // _DEBUG_H_