From 558eb0d41af63ca6fa3045510b04f2cfca8cd778 Mon Sep 17 00:00:00 2001 From: aarzilli Date: Fri, 23 Jun 2017 13:48:09 +0200 Subject: [PATCH] proc: in Next return address could be invalid, ignore errors setting it Updates #893 --- pkg/proc/threads.go | 5 +++-- pkg/terminal/command_test.go | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/proc/threads.go b/pkg/proc/threads.go index c9dc008a..b5c12df0 100644 --- a/pkg/proc/threads.go +++ b/pkg/proc/threads.go @@ -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() } diff --git a/pkg/terminal/command_test.go b/pkg/terminal/command_test.go index 66aeaa93..b39bb6ad 100644 --- a/pkg/terminal/command_test.go +++ b/pkg/terminal/command_test.go @@ -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) { -- GitLab