From f753971e5dc6af3ae399400a1258ca67279d8ea0 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Tue, 3 Jun 2014 01:38:01 +0300 Subject: [PATCH] showbc: Make micropython -v also dump bytecode in hex form. --- py/emitglue.c | 14 +++++++------- 1 file 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