summaryrefslogtreecommitdiff
path: root/tools/mpy-tool.py
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2018-10-18 14:23:17 -0700
committerScott Shawcroft <scott@tannewt.org>2018-10-18 14:23:17 -0700
commitb4dcbb79b2327137a615f37556dc6ffa415658da (patch)
tree6f70db83c284c6b218f51c6b5b1ee9fd652f13bc /tools/mpy-tool.py
parentcb0126131a08a52aa5f66ae0f705079b2ae21080 (diff)
Add back printing out code info. Whoops!
Diffstat (limited to 'tools/mpy-tool.py')
-rwxr-xr-xtools/mpy-tool.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/mpy-tool.py b/tools/mpy-tool.py
index 9e103ec60..5ce24061b 100755
--- a/tools/mpy-tool.py
+++ b/tools/mpy-tool.py
@@ -289,10 +289,12 @@ class RawCode:
print(' ', self.simple_name.qstr_id, '& 0xff,', self.simple_name.qstr_id, '>> 8,')
print(" // source file")
print(' ', self.source_file.qstr_id, '& 0xff,', self.source_file.qstr_id, '>> 8,')
+ print(" // code info")
print(' ', end='')
for i in range(self.ip2 + 4, self.ip):
- opcode = self.bytecode[i]
+ print(' 0x%02x,' % self.bytecode[i], end='')
print()
+ print(" // bytecode")
ip = self.ip
while ip < len(self.bytecode):
f, sz = mp_opcode_format(self.bytecode, ip)