Skip to content

Commit

Permalink
tools/mpy-tool.py: Initialize line_info_top.
Browse files Browse the repository at this point in the history
Without it the line number mapping doesn't work.

Signed-off-by: Martin Milata <martin@martinmilata.cz>
  • Loading branch information
mmilata committed Feb 6, 2023
1 parent e1627d4 commit 2e06e07
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/mpy-tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,10 @@ def freeze_raw_code(self, prelude_ptr=None, type_sig=0):
" .line_info = fun_data_%s + %u,"
% (self.escaped_name, self.offset_line_info)
)
print(
" .line_info_top = fun_data_%s + %u,"
% (self.escaped_name, self.offset_closure_info)
)
print(
" .opcodes = fun_data_%s + %u," % (self.escaped_name, self.offset_opcodes)
)
Expand Down

0 comments on commit 2e06e07

Please sign in to comment.