Do not print DPRINT1s on retail builds

svn path=/trunk/; revision=15516
This commit is contained in:
Alex Ionescu 2005-05-26 13:48:55 +00:00
parent c8a85bc545
commit 42db7235dc
4 changed files with 24 additions and 3 deletions

View file

@ -48,11 +48,19 @@
#endif
#endif
/* TODO: Make the output of file/line and the debug message atomic */
#ifdef DBG
#define DPRINT1 DbgPrint("(%s:%d) ",__FILE__,__LINE__), DbgPrint
#define CHECKPOINT1 do { DbgPrint("%s:%d\n",__FILE__,__LINE__); } while(0);
#else
#ifdef __GNUC__
#define DPRINT1(args...)
#define CHECKPOINT1
#else
#define DPRINT1
#define CHECKPOINT1
#endif /* __GNUC__ */
#endif
#ifndef NDEBUG
#define DPRINT(args...) do { DbgPrint("(%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0);

View file

@ -29,12 +29,17 @@
#define CHECKPOINT do { DbgPrint("(NTDLL:%s:%d) Checkpoint\n",__FILE__,__LINE__); } while(0)
#endif
#ifdef DBG
#if defined(__GNUC__)
#define DPRINT1(args...) do { DbgPrint("(NTDLL:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0)
#else
#define DPRINT1 DbgPrint("(NTDLL:%s:%d) ",__FILE__,__LINE__); DbgPrint
#endif
#define CHECKPOINT1 do { DbgPrint("(NTDLL:%s:%d) Checkpoint\n",__FILE__,__LINE__); } while(0)
#else
#define DPRINT1(args...)
#define CHECKPOINT1(args...)
#endif
#define ROUNDUP(a,b) ((((a)+(b)-1)/(b))*(b))
#define ROUNDDOWN(a,b) (((a)/(b))*(b))

View file

@ -39,9 +39,13 @@
#endif
#endif
#ifdef DBG
#define DPRINT1 DbgPrint("(%s:%d) ",__FILE__,__LINE__), DbgPrint
#define CHECKPOINT1 DbgPrint("%s:%d\n",__FILE__,__LINE__);
#else
#define DPRINT1(args...)
#define CHECKPOINT1(args...)
#endif
#ifdef __NTOSKRNL__
#define DPRINT_CHECKS

View file

@ -12,7 +12,11 @@
unsigned long DbgPrint(char *Format,...);
#if DBG
#define DPRINT1 DbgPrint("(%s:%d:%s) ",__FILE__,__LINE__,__FUNCTION__), DbgPrint
#else
#define DPRINT1(args...)
#endif
#if !defined(DBG) || !defined(YDEBUG)
#ifdef __GNUC__