summaryrefslogtreecommitdiffstats
path: root/linker/linker_debug.h
diff options
context:
space:
mode:
authorShilpa Gopal <c_shutta@quicinc.com>2009-08-01 16:05:30 -0700
committerShilpa Gopal <c_shutta@quicinc.com>2009-08-03 20:13:31 -0700
commit172f4ca290926afd242eef207a7f8205c897afe0 (patch)
treede624f8e840e8782deb60b574fb3368f7b94f0a1 /linker/linker_debug.h
parent47f1e2857eed0b542492dfa35580823e0a45f46c (diff)
parent6ee8f1b0444c0db94931d2cd64427ded8fba38b0 (diff)
downloadbionic-172f4ca290926afd242eef207a7f8205c897afe0.zip
bionic-172f4ca290926afd242eef207a7f8205c897afe0.tar.gz
bionic-172f4ca290926afd242eef207a7f8205c897afe0.tar.bz2
Merge commit 'quic/korg/donut' into donut
Diffstat (limited to 'linker/linker_debug.h')
-rw-r--r--linker/linker_debug.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/linker/linker_debug.h b/linker/linker_debug.h
index 3cc1343..3f4fc4c 100644
--- a/linker/linker_debug.h
+++ b/linker/linker_debug.h
@@ -55,17 +55,16 @@
#define TRUE 1
#define FALSE 0
-
-#define __PRINTVF(v,f,x...) do { \
- (debug_verbosity > (v)) && (printf(x), ((f) && fflush(stdout))); \
- } while (0)
/* Only use printf() during debugging. We have seen occasional memory
* corruption when the linker uses printf().
*/
#if LINKER_DEBUG
extern int debug_verbosity;
#warning "*** LINKER IS USING printf(); DO NOT CHECK THIS IN ***"
-#define _PRINTVF(v,f,x...) __PRINTVF(v,f,x)
+#define _PRINTVF(v,f,x...) \
+ do { \
+ (debug_verbosity > (v)) && (printf(x), ((f) && fflush(stdout))); \
+ } while (0)
#else /* !LINKER_DEBUG */
#define _PRINTVF(v,f,x...) do {} while(0)
#endif /* LINKER_DEBUG */
@@ -75,8 +74,9 @@ extern int debug_verbosity;
#define TRACE(x...) _PRINTVF(1, TRUE, x)
#define WARN(fmt,args...) \
_PRINTVF(-1, TRUE, "%s:%d| WARNING: " fmt, __FILE__, __LINE__, ## args)
-#define ERROR(fmt,args...) \
- __PRINTVF(-1, TRUE, "%s:%d| ERROR: " fmt, __FILE__, __LINE__, ## args)
+#define ERROR(fmt,args...) \
+ _PRINTVF(-1, TRUE, "%s:%d| ERROR: " fmt, __FILE__, __LINE__, ## args)
+
#if TRACE_DEBUG
#define DEBUG(x...) _PRINTVF(2, TRUE, "DEBUG: " x)