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.

49 lines
870 B

  1. /*
  2. - DBGMACRO.H
  3. -
  4. * Annotations and Virtual Communities
  5. * Macros for tracing functions
  6. *
  7. * Revision History:
  8. *
  9. * When Who What
  10. * -------- ------------------ ---------------------------------------
  11. * 3.8.98 Ahalim Created
  12. *
  13. */
  14. #ifndef __DBGMACRO_H_
  15. #define __DBGMACRO_H_
  16. #define TRACE(x) TRACE_OUT((x))
  17. #ifdef DEBUG
  18. #define SET_DEBUG_FUNCTION_NAME(x) \
  19. char *__pszFunctionName = x
  20. #define DEBUG_FUNCTION_NAME __pszFunctionName
  21. #define ENTER(x) \
  22. SET_DEBUG_FUNCTION_NAME(x); \
  23. DbgZPrintFunction("%s() entered", DEBUG_FUNCTION_NAME)
  24. #define LEAVE() \
  25. DbgZPrintFunction("%s() exited", DEBUG_FUNCTION_NAME)
  26. #define VERIFY(f) ASSERT(f)
  27. #else // RETAIL
  28. #define VERIFY(f) ((void)(f))
  29. #define SET_DEBUG_FUNCTION_NAME(x)
  30. #define DEBUG_FUNCTION_NAME
  31. #define ENTER(x)
  32. #define LEAVE()
  33. #endif // DEBUG/RETAIL
  34. #endif // __DBGMACRO_H_