Skip to content

Commit f753971

Browse files
committed
showbc: Make micropython -v also dump bytecode in hex form.
1 parent a4ac5b9 commit f753971

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

py/emitglue.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,16 @@ void mp_emit_glue_assign_bytecode(mp_raw_code_t *rc, byte *code, uint len, uint
7171
DEBUG_printf(" %s", qstr_str(arg_names[i]));
7272
}
7373
DEBUG_printf("\n");
74-
for (int i = 0; i < 128 && i < len; i++) {
75-
if (i > 0 && i % 16 == 0) {
76-
DEBUG_printf("\n");
77-
}
78-
DEBUG_printf(" %02x", code[i]);
79-
}
80-
DEBUG_printf("\n");
8174
#endif
8275
#if MICROPY_DEBUG_PRINTERS
8376
if (mp_verbose_flag > 0) {
77+
for (int i = 0; i < 128 && i < len; i++) {
78+
if (i > 0 && i % 16 == 0) {
79+
printf("\n");
80+
}
81+
printf(" %02x", code[i]);
82+
}
83+
printf("\n");
8484
mp_bytecode_print(rc, code, len);
8585
}
8686
#endif

0 commit comments

Comments
 (0)