Add debug info

This commit is contained in:
Masaaki Goshima 2021-03-19 12:33:14 +09:00
parent 3f3c05827c
commit 455da738a8
1 changed files with 2 additions and 0 deletions

View File

@ -55,6 +55,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt
fmt.Println("error occurred", err) fmt.Println("error occurred", err)
fmt.Println(codeSet.Code.Dump()) fmt.Println(codeSet.Code.Dump())
fmt.Printf("code = %+v\n", code) fmt.Printf("code = %+v\n", code)
fmt.Printf("ctx = %+v\n", ctx)
fmt.Println("b = ", string(b))
fmt.Println("code.op = ", code.Op, "idx = ", code.DisplayIdx, "p = ", load(ctxptr, code.Idx)) fmt.Println("code.op = ", code.Op, "idx = ", code.DisplayIdx, "p = ", load(ctxptr, code.Idx))
panic(err) panic(err)
} }