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.

56 lines
1.6 KiB

  1. /*
  2. * Debugging utilities header
  3. */
  4. #if DBG
  5. extern char szAsrtFmt[];
  6. extern unsigned long BreakFlags;
  7. extern unsigned long TraceFlags;
  8. ULONG __cdecl DbgPrint( LPSTR Format, ...);
  9. VOID DbgAssert(LPSTR file, int line);
  10. VOID DbgTrace(DWORD tf, LPSTR lpstr);
  11. VOID DbgBreak(DWORD bf, LPSTR file, int line);
  12. VOID DbgPrint1(DWORD tf, LPSTR fmt, LPSTR p1);
  13. VOID DbgEnter(LPSTR funName);
  14. VOID DbgLeave(LPSTR funName);
  15. VOID DbgTraceMessage(LPSTR funName, LPSTR msgName);
  16. VOID DbgTraceDefMessage(LPSTR funName, WORD msgId);
  17. // BreakFlags flags
  18. #define BF_WM_CREATE 0x02000000
  19. #define BF_DEFMSGTRACE 0x04000000
  20. #define BF_MSGTRACE 0x08000000
  21. #define BF_PARMTRACE 0x20000000
  22. #define BF_PROCTRACE 0x40000000
  23. #define BF_START 0x80000000
  24. #undef ASSERT
  25. #define ASSERT(fOk) ((!(fOk)) ? DbgAssert(__FILE__, __LINE__) : ((void)0))
  26. #define FBREAK(bf) DbgBreak(bf, __FILE__, __LINE__)
  27. #define TRACE(tf, lpstr) DbgTrace(tf, lpstr)
  28. #define PRINT(tf, fmt, p1) DbgPrint1(tf, fmt, (LPSTR)(p1))
  29. #define MSG(funName, msgName) DbgTraceMessage(funName, msgName)
  30. #define DEFMSG(funName, wMsgId) DbgTraceDefMessage(funName, wMsgId)
  31. #define ENTER(funName) DbgEnter(funName)
  32. #define LEAVE(funName) DbgLeave(funName)
  33. #else // !DBG
  34. #ifndef ASSERT
  35. #define ASSERT(fOk) ((void)0)
  36. #endif
  37. #define FBREAK(bf)
  38. #define TRACE(tf, lpstr)
  39. #define PRINT(tf, fmt, p1)
  40. #define MSG(funName, msgName)
  41. #define DEFMSG(funName, wMsgId)
  42. #define ENTER(funName)
  43. #define LEAVE(funName)
  44. #endif // DBG