proc: in Next return address could be invalid, ignore errors setting it

Updates #893
This commit is contained in:
aarzilli 2017-06-23 13:48:09 +02:00 committed by Derek Parker
parent 5c2673a632
commit 558eb0d41a
2 changed files with 4 additions and 3 deletions

@ -250,10 +250,11 @@ func next(dbp Process, stepInto bool) error {
// this frame and on the return frame.
bp.Cond = sameOrRetFrameCond
}
} else {
return err
}
// Return address could be wrong, if we are unable to set a breakpoint
// there it's ok.
}
if bp, _, _ := curthread.Breakpoint(); bp == nil {
curthread.SetCurrentBreakpoint()
}

@ -216,7 +216,7 @@ func TestExecuteFile(t *testing.T) {
func TestIssue354(t *testing.T) {
printStack([]api.Stackframe{}, "")
printStack([]api.Stackframe{{api.Location{PC: 0, File: "irrelevant.go", Line: 10, Function: nil}, nil, nil, 0, nil}}, "")
printStack([]api.Stackframe{{api.Location{PC: 0, File: "irrelevant.go", Line: 10, Function: nil}, nil, nil, 0, ""}}, "")
}
func TestIssue411(t *testing.T) {