proc: fix next when disassembly fails

Next should work even if one or more instructions in the current
function can not be disassembled.
This commit is contained in:
aarzilli
2018-08-27 07:51:48 +02:00
committed by Derek Parker
parent 63c880780f
commit cab09a4bbb
4 changed files with 38 additions and 0 deletions

View File

@ -3996,3 +3996,15 @@ func TestReadDefer(t *testing.T) {
}
})
}
func TestNextUnknownInstr(t *testing.T) {
if !goversion.VersionAfterOrEqual(runtime.Version(), 1, 10) {
t.Skip("versions of Go before 1.10 can't assemble the instruction VPUNPCKLWD")
}
withTestProcess("nodisasm/", t, func(p proc.Process, fixture protest.Fixture) {
_, err := setFunctionBreakpoint(p, "main.asmFunc")
assertNoError(err, t, "setFunctionBreakpoint()")
assertNoError(proc.Continue(p), t, "Continue()")
assertNoError(proc.Next(p), t, "Next()")
})
}