mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 19:20:22 +01:00
vm: Add rudimentary bytecode execution tracing capability.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user