Skip to content
Snippets Groups Projects
Commit 3077fbff authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

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.
parent e89cc13e
No related branches found
No related tags found
No related merge requests found
...@@ -91,6 +91,8 @@ void nlr_jump_fail(void *val); ...@@ -91,6 +91,8 @@ void nlr_jump_fail(void *val);
#include "mpstate.h" #include "mpstate.h"
#define nlr_raise(val) \ #define nlr_raise(val) \
do { \ do { \
/*printf("nlr_raise: nlr_top=%p\n", MP_STATE_VM(nlr_top)); \
fflush(stdout);*/ \
void *_val = val; \ void *_val = val; \
assert(_val != NULL); \ assert(_val != NULL); \
assert(mp_obj_is_exception_instance(_val)); \ assert(mp_obj_is_exception_instance(_val)); \
...@@ -100,6 +102,12 @@ void nlr_jump_fail(void *val); ...@@ -100,6 +102,12 @@ void nlr_jump_fail(void *val);
#define nlr_push(val) \ #define nlr_push(val) \
assert(MP_STATE_VM(nlr_top) != val),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
#endif // __MICROPY_INCLUDED_PY_NLR_H__ #endif // __MICROPY_INCLUDED_PY_NLR_H__
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment