showbc: Make micropython -v also dump bytecode in hex form.

This commit is contained in:
Paul Sokolovsky 2014-06-03 01:38:01 +03:00
parent a4ac5b9f05
commit f753971e5d
1 changed files with 7 additions and 7 deletions

View File

@ -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