github.com/Rookout/GoSDK@v0.1.48/pkg/services/disassembler/disassembler.go (about) 1 package disassembler 2 3 type Instruction struct { 4 inst 5 Len int 6 PC uintptr 7 Offset uintptr 8 } 9 10 func GetFirstInstruction(instructions []*Instruction, filter func(i *Instruction) bool) (*Instruction, int, bool) { 11 for i, inst := range instructions { 12 if filter(inst) { 13 return inst, i, true 14 } 15 } 16 return nil, 0, false 17 }