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.

39 lines
819 B

  1. //
  2. // debug.h
  3. //
  4. #ifndef IMMIF_DEBUG_H
  5. #define IMMIF_DEBUG_H
  6. #include "debug.h"
  7. #if DBG
  8. #define D(x) x
  9. // namespace immif_debug {
  10. // extern void debug_printf(const char* fmt, ...);
  11. // };
  12. #else
  13. #define D(x)
  14. #endif
  15. #if DBG
  16. #define VERIFY(x) D(ASSERT(x))
  17. #else
  18. #define VERIFY(x) (x)
  19. #endif
  20. #define TRACE0(s) D(DebugMsg(TF_ALWAYS, "%s", s))
  21. #define TRACE1(fmt, a) D(DebugMsg(TF_ALWAYS, fmt, a))
  22. #define TRACE2(fmt, a, b) D(DebugMsg(TF_ALWAYS, fmt, a, b))
  23. #define TRACE3(fmt, a, b, c) D(DebugMsg(TF_ALWAYS, fmt, a, b, c))
  24. #define TRACE4(fmt, a, b, c, d) D(DebugMsg(TF_ALWAYS, fmt, a, b, c, d))
  25. #define TRACE5(fmt, a, b, c, d, e) \
  26. D(DebugMsg(TF_ALWAYS, fmt, a, b, c, d, e))
  27. #endif