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.

50 lines
1.3 KiB

  1. /***************************************************************************\
  2. * Module Name: debug.h
  3. *
  4. * Commonly used debugging macros.
  5. *
  6. * Copyright (c) 1992-1995 Microsoft Corporation
  7. \***************************************************************************/
  8. extern
  9. VOID
  10. DebugPrint(
  11. LONG DebugPrintLevel,
  12. PCHAR DebugMessage,
  13. ...
  14. );
  15. /*
  16. * Values used to enable and disable large numbers of debug print
  17. * statements at once.
  18. */
  19. #define DEBUG_FATAL_ERROR 0 /* Error conditions - should always be enabled */
  20. #define DEBUG_ERROR 1 /* Errors which will not cause the driver to abort */
  21. #define DEBUG_DETAIL 99 /* Extreme detail for low-level debugging */
  22. #define DEBUG_ENTRY_EXIT 50 /* Debug print statements at function entry and exit points */
  23. #if DBG
  24. VOID DebugLog(LONG, CHAR*, ...);
  25. #define DISPDBG(arg) DebugPrint arg
  26. #define STATEDBG(level) DebugState(level)
  27. #if TARGET_BUILD > 351
  28. #define RIP(x) { DebugPrint(0, x); EngDebugBreak();}
  29. #else
  30. #define RIP(x) { DebugPrint(0, x); DebugBreak();}
  31. #endif
  32. #define ASSERTDD(x, y) if (!(x)) RIP (y)
  33. // If we are not in a debug environment, we want all of the debug
  34. // information to be stripped out.
  35. #else
  36. #define DISPDBG(arg)
  37. #define STATEDBG(level)
  38. #define LOGDBG(arg)
  39. #define RIP(x)
  40. #define ASSERTDD(x, y)
  41. #endif
  42.