about summary refs log tree commit diff
path: root/linuxthreads_db/thread_dbP.h
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads_db/thread_dbP.h')
-rw-r--r--linuxthreads_db/thread_dbP.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/linuxthreads_db/thread_dbP.h b/linuxthreads_db/thread_dbP.h
index 7e9fb486c6..13e534afe6 100644
--- a/linuxthreads_db/thread_dbP.h
+++ b/linuxthreads_db/thread_dbP.h
@@ -9,7 +9,12 @@
 
 
 /* Comment out the following for less verbose output.  */
-#define LOG(c) __libc_write (2, c "\n", strlen (c "\n"))
+#ifndef NDEBUG
+# define LOG(c) if (__td_debug) __libc_write (2, c "\n", strlen (c "\n"))
+extern int __td_debug;
+#else
+# define LOG(c)
+#endif
 
 
 /* Handle for a process.  This type is opaque.  */