Skip to content

Commit a0973b0

Browse files
committed
py/vm: Fix VM opcode tracing to print correct stack pointer.
Also const_table is now moved to the code_state->fun_bc structure.
1 parent 220df85 commit a0973b0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

py/vm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#include "py/bc.h"
3939

4040
#if 0
41-
#define TRACE(ip) printf("sp=%d ", (int)(sp - code_state->sp)); mp_bytecode_print2(ip, 1, code_state->const_table);
41+
#define TRACE(ip) printf("sp=%d ", (int)(sp - &code_state->state[0] + 1)); mp_bytecode_print2(ip, 1, code_state->fun_bc->const_table);
4242
#else
4343
#define TRACE(ip)
4444
#endif

0 commit comments

Comments
 (0)