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.

43 lines
953 B

  1. /***************************************************************************\
  2. * Module Name: debug.h
  3. *
  4. * Commonly used debugging macros.
  5. *
  6. * Copyright (c) 1992 Microsoft Corporation
  7. \***************************************************************************/
  8. extern
  9. VOID
  10. DebugPrint(
  11. ULONG DebugPrintLevel,
  12. PCHAR DebugMessage,
  13. ...
  14. ) ;
  15. // DDRAW uses DBG_MESSAGE instead of DISPDBG.
  16. #define DBG_MESSAGE(x) DISPDBG((0,x))
  17. // if we are in a debug environment, macros should
  18. #if DBG
  19. #define DISPDBG(arg) DebugPrint arg
  20. #define RIP(x) { DebugPrint(0, x); }
  21. #ifdef WINNT_VER40
  22. #define ASSERTMSG(x,m) { if (!(x)) {RIP(m); EngDebugBreak();} }
  23. #else
  24. #define ASSERTMSG(x,m) { if (!(x)) {RIP(m); DebugBreak();} }
  25. #endif
  26. // if we are not in a debug environment, we want all of the debug
  27. // information to be stripped out.
  28. #else
  29. #define DISPDBG(arg)
  30. #define RIP(x)
  31. #define ASSERTMSG(x,m)
  32. #endif
  33.