diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-02-15 20:28:18 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-02-15 20:28:18 +0300 |
commit | 3077fbff262fd64b5e71c8f7a4e33e0c0c949ca5 (patch) | |
tree | fac99f7c2c38e5cae7e58bc2c08aae123299465a /py/nlr.h | |
parent | e89cc13e5c4fa05d7f14dabedf3ac21a2dd57084 (diff) |
nlr: Add even more optional debugging logging.
Has to be enabled by manual editing, but at least it's there, as debugging
NLR issues may be weird.
Diffstat (limited to 'py/nlr.h')
-rw-r--r-- | py/nlr.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -91,6 +91,8 @@ void nlr_jump_fail(void *val); #include "mpstate.h" #define nlr_raise(val) \ do { \ + /*printf("nlr_raise: nlr_top=%p\n", MP_STATE_VM(nlr_top)); \ + fflush(stdout);*/ \ void *_val = val; \ assert(_val != NULL); \ assert(mp_obj_is_exception_instance(_val)); \ @@ -100,6 +102,12 @@ void nlr_jump_fail(void *val); #define nlr_push(val) \ assert(MP_STATE_VM(nlr_top) != val),nlr_push(val) +/* +#define nlr_push(val) \ + printf("nlr_push: before: nlr_top=%p, val=%p\n", MP_STATE_VM(nlr_top), val),assert(MP_STATE_VM(nlr_top) != val),nlr_push(val) +#endif +*/ + #endif #endif // __MICROPY_INCLUDED_PY_NLR_H__ |