Browse Source

py: Add verbose debug compile-time flag MICROPY_DEBUG_VERBOSE.

It enables all the DEBUG_printf outputs in the py/ source code.
pull/3271/head
Stefan Naumann 7 years ago
committed by Damien George
parent
commit
ace9fb5405
  1. 2
      py/bc.c
  2. 2
      py/builtinimport.c
  3. 2
      py/emitglue.c
  4. 2
      py/emitnative.c
  5. 2
      py/gc.c
  6. 2
      py/malloc.c
  7. 2
      py/modthread.c
  8. 5
      py/mpconfig.h
  9. 2
      py/nativeglue.c
  10. 2
      py/objfun.c
  11. 2
      py/objtype.c
  12. 2
      py/qstr.c
  13. 2
      py/runtime.c

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

2
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

2
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

2
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

2
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

2
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

2
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

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

2
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

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

2
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

2
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

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

Loading…
Cancel
Save