func SkipInstruction(emu *emulator.Emulator, dis disassembly.Disassembler) error { pc := emu.GetInstructionPointer() insn, e := dis.ReadInstruction(emu, pc) check(e) nextPc := AS.VA(insn.Address + insn.Size) logrus.Debugf("Skipping from %s to %s", pc, nextPc) emu.SetInstructionPointer(nextPc) return nil }
func GetNextInstructionPointer(emu *E.Emulator, sman *E.SnapshotManager) (AS.VA, error) { var va AS.VA e := sman.WithTempExcursion(func() error { e := emu.StepInto() if e != nil { return e } va = emu.GetInstructionPointer() return nil }) return va, e }