From 7a801c440b1cc726774b5d093bb20daada396ed6 Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Thu, 11 Jul 2024 14:54:55 +0300 Subject: [PATCH] *: remove redundant lines at the start/end of block (#3773) --- pkg/internal/gosym/symtab.go | 1 - pkg/proc/eval.go | 1 - pkg/proc/proc_test.go | 3 --- service/debugger/debugger.go | 3 --- 4 files changed, 8 deletions(-) diff --git a/pkg/internal/gosym/symtab.go b/pkg/internal/gosym/symtab.go index 852c08f484..57737776bf 100644 --- a/pkg/internal/gosym/symtab.go +++ b/pkg/internal/gosym/symtab.go @@ -140,7 +140,6 @@ func (T *Table) GetInlineTree(f *Func, goFuncVal, baseaddr uint64, progReader io //goFuncValue := FuncSymName(strver) //return T.go12line.InlineTree(f,goFuncValue,baseaddr,progReader) return T.go12line.InlineTree(f, goFuncVal, baseaddr, progReader) - } func ProgContaining(elfFile *elf.File, addr uint64) *elf.Prog { for _, p := range elfFile.Progs { diff --git a/pkg/proc/eval.go b/pkg/proc/eval.go index 8191f41f1b..ba2eb022b1 100644 --- a/pkg/proc/eval.go +++ b/pkg/proc/eval.go @@ -1039,7 +1039,6 @@ func (stack *evalStack) executeOp() { } else { stack.err = fmt.Errorf("could not find symbol value for %s", op.Name) } - } case *evalop.PushIdent: diff --git a/pkg/proc/proc_test.go b/pkg/proc/proc_test.go index b17e6b0621..722540f7b7 100644 --- a/pkg/proc/proc_test.go +++ b/pkg/proc/proc_test.go @@ -6305,7 +6305,6 @@ func TestRangeOverFuncNext(t *testing.T) { f, ln2 = currentLineNumber(p, t) if ln2 != n { t.Fatalf("Program did not continue to correct next location (expected %d) was %s:%d", n, f, ln2) - } }} } @@ -6365,7 +6364,6 @@ func TestRangeOverFuncNext(t *testing.T) { } withTestProcessArgs("rangeoverfunc", t, ".", []string{}, 0, func(p *proc.Target, grp *proc.TargetGroup, fixture protest.Fixture) { - t.Run("TestTrickyIterAll1", func(t *testing.T) { testseq2intl(t, fixture, grp, p, nil, []seqTest{ funcBreak(t, "main.TestTrickyIterAll"), @@ -6889,7 +6887,6 @@ func TestRangeOverFuncNextInlined(t *testing.T) { } withTestProcessArgs("rangeoverfunc", t, ".", []string{}, protest.EnableInlining, func(p *proc.Target, grp *proc.TargetGroup, fixture protest.Fixture) { - t.Run("TestTrickyIterAll1", func(t *testing.T) { testseq2intl(t, fixture, grp, p, nil, []seqTest{ funcBreak(t, "main.TestTrickyIterAll"), diff --git a/service/debugger/debugger.go b/service/debugger/debugger.go index 5d3ed16033..a638793662 100644 --- a/service/debugger/debugger.go +++ b/service/debugger/debugger.go @@ -494,7 +494,6 @@ func (d *Debugger) Restart(rerecord bool, pos string, resetArgs bool, newArgs [] if !resetArgs && (d.config.Stdout.File != nil || d.config.Stderr.File != nil) { return nil, ErrCanNotRestart - } if err := d.detach(true); err != nil { @@ -1547,7 +1546,6 @@ func traverse(t proc.ValidTargets, f *proc.Function, depth int, followCalls int) TraceMap[cf.Name] = childnode queue = append(queue, childnode) } - } } } @@ -2001,7 +1999,6 @@ func (d *Debugger) convertDefers(defers []*proc.Defer) []api.Defer { SP: defers[i].SP, } } - } return r