diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-06-03 01:38:01 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-06-03 01:39:13 +0300 |
commit | f753971e5dc6af3ae399400a1258ca67279d8ea0 (patch) | |
tree | 43138c32c94ad978a45ea6de2970692eb06646ab | |
parent | a4ac5b9f05367c66eb22ae3a0274968db697420c (diff) | |
download | micropython-f753971e5dc6af3ae399400a1258ca67279d8ea0.tar.gz micropython-f753971e5dc6af3ae399400a1258ca67279d8ea0.zip |
showbc: Make micropython -v also dump bytecode in hex form.
-rw-r--r-- | py/emitglue.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/py/emitglue.c b/py/emitglue.c index fa62ace6df..a89ef6766a 100644 --- a/py/emitglue.c +++ b/py/emitglue.c @@ -71,16 +71,16 @@ void mp_emit_glue_assign_bytecode(mp_raw_code_t *rc, byte *code, uint len, uint DEBUG_printf(" %s", qstr_str(arg_names[i])); } DEBUG_printf("\n"); - for (int i = 0; i < 128 && i < len; i++) { - if (i > 0 && i % 16 == 0) { - DEBUG_printf("\n"); - } - DEBUG_printf(" %02x", code[i]); - } - DEBUG_printf("\n"); #endif #if MICROPY_DEBUG_PRINTERS if (mp_verbose_flag > 0) { + for (int i = 0; i < 128 && i < len; i++) { + if (i > 0 && i % 16 == 0) { + printf("\n"); + } + printf(" %02x", code[i]); + } + printf("\n"); mp_bytecode_print(rc, code, len); } #endif |