f25e1613ad52c7d5bdc78251ddd51f7ebd0d6c30
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: include/msvcrt/msvcrtdbg.h
5 * PURPOSE: Useful debugging macros
12 * NOTE: Define NDEBUG before including this header to disable debugging
16 #ifndef __MSVCRT_DEBUG
17 #define __MSVCRT_DEBUG
31 unsigned long DbgPrint(char *Format
,...);
38 #define DPRINT1(args...) do { DbgPrint("(MSVCRT:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0);
40 #define DPRINT1 DbgPrint
42 #define CHECKPOINT1 do { DbgPrint("MSVCRT:%s:%d\n",__FILE__,__LINE__); } while(0);
45 #define DPRINT1(args...)
47 #define DPRINT DbgPrint
52 #if !defined(NDEBUG) && defined(DBG)
53 #define DPRINT(args...) do { DbgPrint("(MSVCRT:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0);
54 #define CHECKPOINT do { DbgPrint("MSVCRT:%s:%d\n",__FILE__,__LINE__); } while(0);
57 #define DPRINT(args...)
59 #define DPRINT DbgPrint
67 #define TRACE_RETURN(format_str, ret_type) \
68 ret_type __return_value__; \
69 static char* __return_format_str__ = "%s ret: "format_str"\n"
71 #define FUNCTION(func) \
72 static char* __func_name__ = #func
74 #define TRACE(a,b...) DPRINT1(a"\n", b)
77 do{ __return_value__ = (a); DPRINT1(__return_format_str__ ,__func_name__,__return_value__); return __return_value__ ; }while(0)
82 /* ULONG CDECL DbgPrint(PCH Format, ...); */
83 ULONG
DbgPrint(PCH Format
,...);
84 /* unsigned long DbgPrint(const char* Format, ...); */
88 /* #define TRACE 0 ? (void)0 : Trace */
90 /* void Trace(TCHAR* lpszFormat, ...); */
94 #endif /* __MSVCRT_DEBUG */