diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-04-23 03:40:24 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-04-23 03:46:00 +0300 |
commit | c5e32c69952222b12e65655474c5f4c4481ea9f7 (patch) | |
tree | 9af06c1e2ce450e9b2f21f793cad2cfe97d26730 /py/showbc.c | |
parent | 4c6b375960098c6596541b1e48c1210b10198d98 (diff) |
vm: Add rudimentary bytecode execution tracing capability.
Diffstat (limited to 'py/showbc.c')
-rw-r--r-- | py/showbc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/py/showbc.c b/py/showbc.c index 2adbd01be..17cb2eadd 100644 --- a/py/showbc.c +++ b/py/showbc.c @@ -28,6 +28,8 @@ ip += sizeof(machine_uint_t); \ } while (0) +void mp_byte_code_print2(const byte *ip, int len); + void mp_byte_code_print(const byte *ip, int len) { const byte *ip_start = ip; @@ -71,7 +73,11 @@ void mp_byte_code_print(const byte *ip, int len) { printf(" bc=" INT_FMT " line=" UINT_FMT "\n", bc, source_line); } } + mp_byte_code_print2(ip, len - 0); +} +void mp_byte_code_print2(const byte *ip, int len) { + const byte *ip_start = ip; machine_uint_t unum; qstr qstr; while (ip - ip_start < len) { |