diff --git a/pkg/proc/proc_test.go b/pkg/proc/proc_test.go index 7414f8dc93e74f23684e067d140d3fb519ef8955..7dec4f551ebf9e91f6c58ef320b031f199657226 100644 --- a/pkg/proc/proc_test.go +++ b/pkg/proc/proc_test.go @@ -590,18 +590,12 @@ func TestNextFunctionReturnDefer(t *testing.T) { {5, 6}, {6, 9}, {9, 10}, - {10, 6}, - {6, 7}, - {7, 8}, } } else { testcases = []nextTest{ {5, 8}, {8, 9}, {9, 10}, - {10, 6}, - {6, 7}, - {7, 8}, } } protest.AllowRecording(t) @@ -2132,10 +2126,6 @@ func TestNextDeferReturnAndDirectCall(t *testing.T) { {10, 11}, {11, 12}, {12, 13}, - {13, 5}, - {5, 6}, - {6, 7}, - {7, 13}, {13, 28}}, "main.callAndDeferReturn", t) } diff --git a/pkg/proc/threads.go b/pkg/proc/threads.go index 30f8c2ac76d8161ca26e63f7b7cf9fa67a7c2313..1545b60fd983751b2f47fb07717fb0f0eb408725 100644 --- a/pkg/proc/threads.go +++ b/pkg/proc/threads.go @@ -196,7 +196,7 @@ func next(dbp Process, stepInto bool) error { return err } } - if bp != nil { + if bp != nil && stepInto { bp.DeferReturns = deferreturns } }