tools/mpy-tool.py: Fix freezing of non-bytecode funcs with settrace.
Only bytecode functions can be profiled at this stage. Native functions (eg inline assembler) may not even have a valid prelude. Fixes issue #5075.pull/1/head
parent
bd2e46e0a5
commit
c69f58e6b9
|
@ -412,6 +412,7 @@ class RawCode(object):
|
|||
print(' .fun_data_len = %u,' % len(self.bytecode))
|
||||
print(' .n_obj = %u,' % len(self.objs))
|
||||
print(' .n_raw_code = %u,' % len(self.raw_codes))
|
||||
if self.code_kind == MP_CODE_BYTECODE:
|
||||
print(' #if MICROPY_PY_SYS_SETTRACE')
|
||||
print(' .prelude = {')
|
||||
print(' .n_state = %u,' % self.prelude[0])
|
||||
|
|
Loading…
Reference in New Issue