]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/debug/dwarf/entry_test.go
debug/elf: support zstd compression
[gostls13.git] / src / debug / dwarf / entry_test.go
index 4e96dbfc1d56409ff49691dd6ab5423d7fe29150..1ce1c98f60a6ada121daadbbf33c08abfa56fd5f 100644 (file)
@@ -69,6 +69,12 @@ func TestReaderSeek(t *testing.T) {
                {0x40117e, nil},
        }
        testRanges(t, "testdata/line-clang-dwarf5.elf", want)
+
+       want = []wantRange{
+               {0x401126, [][2]uint64{{0x401126, 0x40116a}}},
+               {0x40116a, [][2]uint64{{0x40116a, 0x401180}}},
+       }
+       testRanges(t, "testdata/line-gcc-zstd.elf", want)
 }
 
 func TestRangesSection(t *testing.T) {
@@ -156,6 +162,15 @@ func TestReaderRanges(t *testing.T) {
                                {"f2", [][2]uint64{{0x401180, 0x401197}}},
                        },
                },
+               {
+                       "testdata/line-gcc-zstd.elf",
+                       subprograms{
+                               {"f2", nil},
+                               {"main", [][2]uint64{{0x40114b, 0x40116a}}},
+                               {"f1", [][2]uint64{{0x401126, 0x40114b}}},
+                               {"f2", [][2]uint64{{0x40116a, 0x401180}}},
+                       },
+               },
        }
 
        for _, test := range tests {