Source code of Windows XP (NT5)
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.

103 lines
3.4 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. msdebug.c
  5. Abstract:
  6. This module declares the debug functions used by the mailslot
  7. file system.
  8. Author:
  9. Manny Weiser (mannyw) 7-Jan-1991
  10. Revision History:
  11. --*/
  12. #ifndef _MSDEBUG_
  13. #define _MSDEBUG_
  14. //
  15. // The mailslot debug levels:
  16. //
  17. // 0x00000000 Always gets printed (used when about to bug check)
  18. #ifdef MSDBG
  19. #define DEBUG_TRACE_ERROR (0x00000001)
  20. #define DEBUG_TRACE_DEBUG_HOOKS (0x00000002)
  21. #define DEBUG_TRACE_CATCH_EXCEPTIONS (0x00000004)
  22. #define DEBUG_TRACE_CREATE (0x00000008)
  23. #define DEBUG_TRACE_CLOSE (0x00000010)
  24. #define DEBUG_TRACE_READ (0x00000020)
  25. #define DEBUG_TRACE_WRITE (0x00000040)
  26. #define DEBUG_TRACE_FILEINFO (0x00000080)
  27. #define DEBUG_TRACE_CLEANUP (0x00000100)
  28. #define DEBUG_TRACE_DIR (0x00000200)
  29. #define DEBUG_TRACE_FSCONTROL (0x00000400)
  30. #define DEBUG_TRACE_CREATE_MAILSLOT (0x00000800)
  31. #define DEBUG_TRACE_SEINFO (0x00001000)
  32. #define DEBUG_TRACE_0x00002000 (0x00002000)
  33. #define DEBUG_TRACE_0x00004000 (0x00004000)
  34. #define DEBUG_TRACE_0x00008000 (0x00008000)
  35. #define DEBUG_TRACE_0x00010000 (0x00010000)
  36. #define DEBUG_TRACE_DEVIOSUP (0x00020000)
  37. #define DEBUG_TRACE_VERIFY (0x00040000)
  38. #define DEBUG_TRACE_WORK_QUEUE (0x00080000)
  39. #define DEBUG_TRACE_READSUP (0x00100000)
  40. #define DEBUG_TRACE_WRITESUP (0x00200000)
  41. #define DEBUG_TRACE_STATESUP (0x00400000)
  42. #define DEBUG_TRACE_FILOBSUP (0x00800000)
  43. #define DEBUG_TRACE_PREFXSUP (0x01000000)
  44. #define DEBUG_TRACE_CNTXTSUP (0x02000000)
  45. #define DEBUG_TRACE_DATASUP (0x04000000)
  46. #define DEBUG_TRACE_DPC (0x08000000)
  47. #define DEBUG_TRACE_REFCOUNT (0x10000000)
  48. #define DEBUG_TRACE_STRUCSUP (0x20000000)
  49. #define DEBUG_TRACE_FSP_DISPATCHER (0x40000000)
  50. #define DEBUG_TRACE_FSP_DUMP (0x80000000)
  51. extern LONG MsDebugTraceLevel;
  52. extern LONG MsDebugTraceIndent;
  53. #define DebugDump(STR,LEVEL,PTR) { \
  54. ULONG _i; \
  55. VOID MsDump(IN PVOID Ptr); \
  56. if (((LEVEL) == 0) || (MsDebugTraceLevel & (LEVEL))) { \
  57. _i = (ULONG)PsGetCurrentThread(); \
  58. DbgPrint("%08lx:",_i); \
  59. DbgPrint(STR); \
  60. if (PTR != NULL) {MsDump(PTR);} \
  61. DbgBreakPoint(); \
  62. } \
  63. }
  64. #define DebugTrace(i,l,x,y) _DebugTrace(i,l,x,(ULONG)y)
  65. //
  66. // The following routine and macro is used to catch exceptions in
  67. // try except statements. It allows us to catch the exception before
  68. // executing the exception handler. The exception catcher procedure is
  69. // declared in msdata.c
  70. //
  71. LONG MsExceptionCatcher (IN PSZ String);
  72. #define Exception(STR) (MsExceptionCatcher(STR))
  73. #else
  74. #define DebugDump(STR,LEVEL,PTR) {NOTHING;}
  75. #define Exception(STR) (EXCEPTION_EXECUTE_HANDLER)
  76. #define DebugTrace(I,L,X,Y) {NOTHING;}
  77. #endif // MSDBG
  78. #endif // _MSDEBUG_
  79.