summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to 'py')
-rw-r--r--py/bc.c2
-rw-r--r--py/builtinimport.c2
-rw-r--r--py/emitglue.c2
-rw-r--r--py/emitnative.c2
-rw-r--r--py/gc.c2
-rw-r--r--py/malloc.c2
-rw-r--r--py/modthread.c2
-rw-r--r--py/mpconfig.h5
-rw-r--r--py/nativeglue.c2
-rw-r--r--py/objfun.c2
-rw-r--r--py/objtype.c2
-rw-r--r--py/qstr.c2
-rw-r--r--py/runtime.c2
13 files changed, 17 insertions, 12 deletions
diff --git a/py/bc.c b/py/bc.c
index 522eb0aeb0..917eba57d9 100644
--- a/py/bc.c
+++ b/py/bc.c
@@ -35,7 +35,7 @@
#include "py/bc0.h"
#include "py/bc.h"
-#if 0 // print debugging info
+#if MICROPY_DEBUG_VERBOSE // print debugging info
#define DEBUG_PRINT (1)
#else // don't print debugging info
#define DEBUG_PRINT (0)
diff --git a/py/builtinimport.c b/py/builtinimport.c
index e0ce91d9be..f5bfb0d982 100644
--- a/py/builtinimport.c
+++ b/py/builtinimport.c
@@ -37,7 +37,7 @@
#include "py/builtin.h"
#include "py/frozenmod.h"
-#if 0 // print debugging info
+#if MICROPY_DEBUG_VERBOSE // print debugging info
#define DEBUG_PRINT (1)
#define DEBUG_printf DEBUG_printf
#else // don't print debugging info
diff --git a/py/emitglue.c b/py/emitglue.c
index 383e6a136b..d2add988f2 100644
--- a/py/emitglue.c
+++ b/py/emitglue.c
@@ -35,7 +35,7 @@
#include "py/runtime0.h"
#include "py/bc.h"
-#if 0 // print debugging info
+#if MICROPY_DEBUG_VERBOSE // print debugging info
#define DEBUG_PRINT (1)
#define WRITE_CODE (1)
#define DEBUG_printf DEBUG_printf
diff --git a/py/emitnative.c b/py/emitnative.c
index 7ce6196254..4608cd1e0c 100644
--- a/py/emitnative.c
+++ b/py/emitnative.c
@@ -50,7 +50,7 @@
#include "py/emit.h"
#include "py/bc.h"
-#if 0 // print debugging info
+#if MICROPY_DEBUG_VERBOSE // print debugging info
#define DEBUG_PRINT (1)
#define DEBUG_printf DEBUG_printf
#else // don't print debugging info
diff --git a/py/gc.c b/py/gc.c
index 7253b7db68..3a505e9c78 100644
--- a/py/gc.c
+++ b/py/gc.c
@@ -35,7 +35,7 @@
#if MICROPY_ENABLE_GC
-#if 0 // print debugging info
+#if MICROPY_DEBUG_VERBOSE // print debugging info
#define DEBUG_PRINT (1)
#define DEBUG_printf DEBUG_printf
#else // don't print debugging info
diff --git a/py/malloc.c b/py/malloc.c
index e679e20926..af4ccf2e81 100644
--- a/py/malloc.c
+++ b/py/malloc.c
@@ -32,7 +32,7 @@
#include "py/misc.h"
#include "py/mpstate.h"
-#if 0 // print debugging info
+#if MICROPY_DEBUG_VERBOSE // print debugging info
#define DEBUG_printf DEBUG_printf
#else // don't print debugging info
#define DEBUG_printf(...) (void)0
diff --git a/py/modthread.c b/py/modthread.c
index 1d76027893..bf74128e81 100644
--- a/py/modthread.c
+++ b/py/modthread.c
@@ -34,7 +34,7 @@
#include "py/mpthread.h"
-#if 0 // print debugging info
+#if MICROPY_DEBUG_VERBOSE // print debugging info
#define DEBUG_PRINT (1)
#define DEBUG_printf DEBUG_printf
#else // don't print debugging info
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 0e76a1ff5e..dac8a903c9 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -373,6 +373,11 @@
#define MICROPY_DEBUG_PRINTERS (0)
#endif
+// Whether to enable all debugging outputs (it will be extremely verbose)
+#ifndef MICROPY_DEBUG_VERBOSE
+#define MICROPY_DEBUG_VERBOSE (0)
+#endif
+
/*****************************************************************************/
/* Optimisations */
diff --git a/py/nativeglue.c b/py/nativeglue.c
index 46c6906d96..e954234c27 100644
--- a/py/nativeglue.c
+++ b/py/nativeglue.c
@@ -34,7 +34,7 @@
#include "py/emitglue.h"
#include "py/bc.h"
-#if 0 // print debugging info
+#if MICROPY_DEBUG_VERBOSE // print debugging info
#define DEBUG_printf DEBUG_printf
#else // don't print debugging info
#define DEBUG_printf(...) (void)0
diff --git a/py/objfun.c b/py/objfun.c
index eaba131293..5606511d8a 100644
--- a/py/objfun.c
+++ b/py/objfun.c
@@ -36,7 +36,7 @@
#include "py/bc.h"
#include "py/stackctrl.h"
-#if 0 // print debugging info
+#if MICROPY_DEBUG_VERBOSE // print debugging info
#define DEBUG_PRINT (1)
#else // don't print debugging info
#define DEBUG_PRINT (0)
diff --git a/py/objtype.c b/py/objtype.c
index 87c0cc9e5c..e1a24da7e7 100644
--- a/py/objtype.c
+++ b/py/objtype.c
@@ -35,7 +35,7 @@
#include "py/runtime0.h"
#include "py/runtime.h"
-#if 0 // print debugging info
+#if MICROPY_DEBUG_VERBOSE // print debugging info
#define DEBUG_PRINT (1)
#define DEBUG_printf DEBUG_printf
#else // don't print debugging info
diff --git a/py/qstr.c b/py/qstr.c
index fdb38f1dec..95c9b6835e 100644
--- a/py/qstr.c
+++ b/py/qstr.c
@@ -36,7 +36,7 @@
// ultimately we will replace this with a static hash table of some kind
// also probably need to include the length in the string data, to allow null bytes in the string
-#if 0 // print debugging info
+#if MICROPY_DEBUG_VERBOSE // print debugging info
#define DEBUG_printf DEBUG_printf
#else // don't print debugging info
#define DEBUG_printf(...) (void)0
diff --git a/py/runtime.c b/py/runtime.c
index 9c3edeb9c8..eb1298813f 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -44,7 +44,7 @@
#include "py/stackctrl.h"
#include "py/gc.h"
-#if 0 // print debugging info
+#if MICROPY_DEBUG_VERBOSE // print debugging info
#define DEBUG_PRINT (1)
#define DEBUG_printf DEBUG_printf
#define DEBUG_OP_printf(...) DEBUG_printf(__VA_ARGS__)