diff --git a/pkg/dwarf/line/line_parser_test.go b/pkg/dwarf/line/line_parser_test.go index 9ffda014..08a8a6eb 100644 --- a/pkg/dwarf/line/line_parser_test.go +++ b/pkg/dwarf/line/line_parser_test.go @@ -114,10 +114,10 @@ func testDebugLinePrologueParser(p string, t *testing.T) { } for _, ln := range dbl.Lookup { - if ln.Path == "" { + if ln.Path == "" || strings.HasPrefix(ln.Path, "_") || ln.Path == "_gomod_.go" { continue } - if _, err := os.Stat(ln.Path); err != nil { + if _, err := os.Stat(ln.Path); err != nil { t.Fatalf("Invalid input path %s: %s\n", ln.Path, err) } } @@ -299,7 +299,7 @@ func BenchmarkPCToLine(b *testing.B) { } } -func TestDebugLineC(t * testing.T) { +func TestDebugLineC(t *testing.T) { p, err := filepath.Abs("../../../_fixtures/debug_line_c_data") if err != nil { t.Fatal("Could not find test data", p, err) @@ -316,9 +316,9 @@ func TestDebugLineC(t * testing.T) { t.Fatal("Parser result is empty") } - file := []string{"main.c", "/mnt/c/develop/delve/_fixtures/main.c" ,"/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h", - "/usr/include/x86_64-linux-gnu/bits/types.h" ,"/usr/include/x86_64-linux-gnu/bits/libio.h", "/usr/include/stdio.h", - "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h"} + file := []string{"main.c", "/mnt/c/develop/delve/_fixtures/main.c", "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h", + "/usr/include/x86_64-linux-gnu/bits/types.h", "/usr/include/x86_64-linux-gnu/bits/libio.h", "/usr/include/stdio.h", + "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h"} for _, ln := range parsed { if len(ln.FileNames) == 0 {