From 47989248edaaf265e08a93a37d510c4fa1b76205 Mon Sep 17 00:00:00 2001 From: Alessandro Arzilli Date: Fri, 26 May 2023 19:04:37 +0200 Subject: [PATCH] dwarf/op: use readMemory function (#3391) dwarf/op gained the ability to execute DW_OP_deref opcodes a while ago but because we didn't save the readMemory function in the context structure it never worked. --- pkg/dwarf/op/op.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/dwarf/op/op.go b/pkg/dwarf/op/op.go index a3269f20..e8a807f6 100644 --- a/pkg/dwarf/op/op.go +++ b/pkg/dwarf/op/op.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - "github.com/go-delve/delve/pkg/dwarf/leb128" "github.com/go-delve/delve/pkg/dwarf" + "github.com/go-delve/delve/pkg/dwarf/leb128" ) // Opcode represent a DWARF stack program instruction. @@ -67,6 +67,7 @@ func ExecuteStackProgram(regs DwarfRegisters, instructions []byte, ptrSize int, stack: make([]int64, 0, 3), DwarfRegisters: regs, ptrSize: ptrSize, + readMemory: readMemory, } for tick := 0; tick < len(instructions)*arbitraryExecutionLimitFactor; tick++ {