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.

134 lines
3.2 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows NT **/
  3. /** Copyright(c) Microsoft Corp., 1994 **/
  4. /**********************************************************************/
  5. /*
  6. debug.h
  7. This file contains a number of debug-dependent definitions.
  8. FILE HISTORY:
  9. KeithMo 20-Sep-1993 Created.
  10. */
  11. #ifndef _DEBUG_H_
  12. #define _DEBUG_H_
  13. #ifdef DEBUG
  14. #include <stdarg.h>
  15. //
  16. // Debug output control flags.
  17. //
  18. extern DWORD VxdDebugFlags;
  19. #define VXD_DEBUG_INIT 0x00000001L
  20. #define VXD_DEBUG_SOCKET 0x00000002L
  21. #define VXD_DEBUG_MISC 0x00000004L
  22. #define VXD_DEBUG_BIND 0x00000008L
  23. #define VXD_DEBUG_ACCEPT 0x00000010L
  24. #define VXD_DEBUG_CONNECT 0x00000020L
  25. #define VXD_DEBUG_LISTEN 0x00000040L
  26. #define VXD_DEBUG_RECV 0x00000080L
  27. #define VXD_DEBUG_SEND 0x00000100L
  28. #define VXD_DEBUG_SOCKOPT 0x00000200L
  29. #define VXD_DEBUG_CONFIG 0x00000400L
  30. #define VXD_DEBUG_CONNECT_EVENT 0x00000800L
  31. #define VXD_DEBUG_DISCONNECT_EVENT 0x00001000L
  32. #define VXD_DEBUG_ERROR_EVENT 0x00002000L
  33. #define VXD_DEBUG_RECV_EVENT 0x00004000L
  34. #define VXD_DEBUG_RECV_DATAGRAM_EVENT 0x00008000L
  35. #define VXD_DEBUG_RECV_EXPEDITED_EVENT 0x00010000L
  36. // #define VXD_DEBUG_ 0x00020000L
  37. // #define VXD_DEBUG_ 0x00040000L
  38. // #define VXD_DEBUG_ 0x00080000L
  39. // #define VXD_DEBUG_ 0x00100000L
  40. // #define VXD_DEBUG_ 0x00200000L
  41. // #define VXD_DEBUG_ 0x00400000L
  42. // #define VXD_DEBUG_ 0x00800000L
  43. // #define VXD_DEBUG_ 0x01000000L
  44. // #define VXD_DEBUG_ 0x02000000L
  45. // #define VXD_DEBUG_ 0x04000000L
  46. // #define VXD_DEBUG_ 0x08000000L
  47. // #define VXD_DEBUG_ 0x10000000L
  48. // #define VXD_DEBUG_ 0x20000000L
  49. // #define VXD_DEBUG_ 0x40000000L
  50. #define VXD_DEBUG_OUTPUT_TO_DEBUGGER 0x80000000L
  51. #if 0
  52. #define IF_DEBUG(flag) if ( (VxdDebugFlags & VXD_DEBUG_ ## flag) != 0 )
  53. #endif
  54. #define VXD_PRINT(args) VxdPrintf args
  55. //
  56. // Assert & require.
  57. //
  58. void VxdAssert( void * pAssertion,
  59. void * pFileName,
  60. unsigned long nLineNumber );
  61. #define VXD_ASSERT(exp) if (!(exp)) VxdAssert( #exp, __FILE__, __LINE__ )
  62. #define VXD_REQUIRE VXD_ASSERT
  63. //
  64. // Miscellaneous goodies.
  65. //
  66. void VxdDebugOutput( char * pszMessage );
  67. #define DEBUG_BREAK _asm int 3
  68. #define DEBUG_OUTPUT(x) VxdDebugOutput(x)
  69. #else // !DEBUG
  70. //
  71. // No debug output.
  72. //
  73. #undef IF_DEBUG
  74. #define IF_DEBUG(flag) if (0)
  75. //
  76. // Null debug output function.
  77. //
  78. #define VXD_PRINT(args)
  79. //
  80. // Null assert & require.
  81. //
  82. #define VXD_ASSERT(exp)
  83. #define VXD_REQUIRE(exp) ((void)(exp))
  84. //
  85. // No goodies.
  86. //
  87. #define DEBUG_BREAK
  88. #define DEBUG_OUTPUT(x)
  89. #endif // DEBUG
  90. #endif // _DEBUG_H_
  91.