diff options
| author | Ian Lance Taylor <iant@golang.org> | 2021-03-16 13:31:20 -0700 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2021-03-17 00:54:09 +0000 |
| commit | a826f7dc45f2e0f210341893bd70740aef6b777d (patch) | |
| tree | 7993b3259e05b1a46ee0fa2b22b46b546a886569 /src/debug/dwarf/entry_test.go | |
| parent | 63b0a0a5b83e28f55ce68cf1099d9c5ff3998b60 (diff) | |
| download | go-a826f7dc45f2e0f210341893bd70740aef6b777d.tar.xz | |
debug/dwarf: support DW_FORM_rnglistx aka formRnglistx
Change-Id: I7df915978af3488f46a27595a1b04d0d33f81f7b
Reviewed-on: https://go-review.googlesource.com/c/go/+/302369
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Diffstat (limited to 'src/debug/dwarf/entry_test.go')
| -rw-r--r-- | src/debug/dwarf/entry_test.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/debug/dwarf/entry_test.go b/src/debug/dwarf/entry_test.go index b54f8b4f8d..1f41d742ea 100644 --- a/src/debug/dwarf/entry_test.go +++ b/src/debug/dwarf/entry_test.go @@ -84,6 +84,19 @@ func TestRangesSection(t *testing.T) { testRanges(t, "testdata/ranges.elf", want) } +func TestRangesRnglistx(t *testing.T) { + want := []wantRange{ + {0x401000, [][2]uint64{{0x401020, 0x40102c}, {0x401000, 0x40101d}}}, + {0x40101c, [][2]uint64{{0x401020, 0x40102c}, {0x401000, 0x40101d}}}, + {0x40101d, nil}, + {0x40101f, nil}, + {0x401020, [][2]uint64{{0x401020, 0x40102c}, {0x401000, 0x40101d}}}, + {0x40102b, [][2]uint64{{0x401020, 0x40102c}, {0x401000, 0x40101d}}}, + {0x40102c, nil}, + } + testRanges(t, "testdata/rnglistx.elf", want) +} + func testRanges(t *testing.T, name string, want []wantRange) { d := elfData(t, name) r := d.Reader() |
