py: Add verbose debug compile-time flag MICROPY_DEBUG_VERBOSE.

It enables all the DEBUG_printf outputs in the py/ source code.
pull/1/head
Stefan Naumann 2017-07-24 18:55:14 +02:00 committed by Damien George
parent a14ce77b28
commit ace9fb5405
13 changed files with 17 additions and 12 deletions

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 */

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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__)