diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-24 11:06:10 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-24 11:06:10 +0100 |
commit | 1cbb99d1db2d2d712b6f37a67ed15a20b7d3baae (patch) | |
tree | 32b9e3ab5cda409523f0b9ffdbfd0b8ddb7dc760 /py/showbc.c | |
parent | 1c1d902cd395f1b521e4fe1e11f8f26f50eafc3f (diff) | |
parent | c5e32c69952222b12e65655474c5f4c4481ea9f7 (diff) | |
download | micropython-1cbb99d1db2d2d712b6f37a67ed15a20b7d3baae.tar.gz micropython-1cbb99d1db2d2d712b6f37a67ed15a20b7d3baae.zip |
Merge pull request #518 from pfalcon/vm-trace
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 2adbd01beb..17cb2eadd6 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) { |