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.

83 lines
2.2 KiB

  1. //**************************************************************************
  2. //
  3. // DEBUG.H -- Xena Gaming Project
  4. //
  5. // Version 3.XX
  6. //
  7. // Copyright (c) 1997 Microsoft Corporation. All rights reserved.
  8. //
  9. // @doc
  10. // @header DEBUG.H | Global includes and definitions for debugging output
  11. //**************************************************************************
  12. #ifndef DEBUG_H
  13. #define DEBUG_H
  14. //---------------------------------------------------------------------------
  15. // Definitions
  16. //---------------------------------------------------------------------------
  17. typedef enum
  18. { // @enum DBG_LEVEL | Debug verbosity levels
  19. DBG_CRITICAL, // @emem Critical debug output
  20. DBG_SEVERE, // @emem Severe debug output
  21. DBG_CONTROL, // @emem Control debug output (default)
  22. DBG_INFORM, // @emem Inform debug output
  23. DBG_VERBOSE // @emem Verbose debug output
  24. } DBG_LEVEL;
  25. //
  26. // Default output verbosity level
  27. //
  28. #define DBG_DEFAULT DBG_CONTROL
  29. //
  30. // Conditional debug output procedures
  31. //
  32. // jacklin - Windows bug 321472. Disabling debug output even for chk build
  33. #if (DBG==1 && defined(I_WANT_DEBUG_OUTPUT_AND_BREAK_BVT))
  34. #define MsGameLevel(x) DEBUG_Level (x)
  35. #define MsGamePrint(x) DEBUG_Print x
  36. #define MsGameBreak() DbgBreakPoint ()
  37. #undef PAGED_CODE
  38. #define PAGED_CODE() \
  39. if (KeGetCurrentIrql() > APC_LEVEL) \
  40. {\
  41. MsGamePrint((DBG_CRITICAL,"%s: Pageable code called at IRQL %ld (file: %s, line:#%ld)\n",MSGAME_NAME,KeGetCurrentIrql(),__FILE__,__LINE__));\
  42. ASSERT(FALSE); \
  43. }
  44. #else // DBG=0
  45. #define MsGameLevel(x)
  46. #define MsGamePrint(x)
  47. #define MsGameBreak()
  48. #undef PAGED_CODE
  49. #define PAGED_CODE()
  50. #endif // DBG=?
  51. //---------------------------------------------------------------------------
  52. // Procedures
  53. //---------------------------------------------------------------------------
  54. DBG_LEVEL
  55. DEBUG_Level (
  56. IN DBG_LEVEL uLevel
  57. );
  58. VOID
  59. DEBUG_Print (
  60. IN DBG_LEVEL uLevel,
  61. IN PCSZ szMessage,
  62. IN ...
  63. );
  64. //===========================================================================
  65. // End
  66. //===========================================================================
  67. #endif // DEBUG_H