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
37 #define DPRINT1(args...) do { DbgPrint("(MSVCRT:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0);
38 #define CHECKPOINT1 do { DbgPrint("MSVCRT:%s:%d\n",__FILE__,__LINE__); } while(0);
41 #define DPRINT1(args...)
43 #define DPRINT DbgPrint
48 #if !defined(NDEBUG) && defined(DBG)
49 #define DPRINT(args...) do { DbgPrint("(MSVCRT:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0);
50 #define CHECKPOINT do { DbgPrint("MSVCRT:%s:%d\n",__FILE__,__LINE__); } while(0);
53 #define DPRINT(args...)
55 #define DPRINT DbgPrint
63 #define TRACE_RETURN(format_str, ret_type) \
64 ret_type __return_value__; \
65 static char* __return_format_str__ = "%s ret: "format_str"\n"
67 #define FUNCTION(func) \
68 static char* __func_name__ = #func
70 #define TRACE(a,b...) DPRINT1(a"\n", b)
73 do{ __return_value__ = (a); DPRINT1(__return_format_str__ ,__func_name__,__return_value__); return __return_value__ ; }while(0)
78 /* ULONG CDECL DbgPrint(PCH Format, ...); */
79 ULONG
DbgPrint(PCH Format
,...);
80 /* unsigned long DbgPrint(const char* Format, ...); */
84 /* #define TRACE 0 ? (void)0 : Trace */
86 /* void Trace(TCHAR* lpszFormat, ...); */
90 #endif /* __MSVCRT_DEBUG */