]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libdw: Handle GNU DebugFission split ranges.
authorMark Wielaard <mark@klomp.org>
Fri, 18 May 2018 22:46:02 +0000 (00:46 +0200)
committerMark Wielaard <mark@klomp.org>
Tue, 22 May 2018 22:31:22 +0000 (00:31 +0200)
commit144b73c49acf3ed894e4635aedb9b0d1208ade2e
tree53ce2f235c75324b4010c419b5d5fe1a524c09ba
parenta4c74cc67de22cb3208fc768989c509d6837cd77
libdw: Handle GNU DebugFission split ranges.

GNU DebugFission split dwarf handles DW_FORM_sec_offset specially for
attributes that point to ranges. The .debug_ranges section is not in
the .dwo file, but in the main/skeleton object file. The sec_offset is
not relocated (in the ELF file), but is an offset against the skeleton
DIE DW_AT_GNU_ranges_base attribute. dwarf_formudata is changed so it
still looks like a normal offset ptr into the .debug_ranges section.
dwarf_ranges is adapted to look for the .debug_ranges in the main object
file. dwarf_highpc and dwarf_lowpc now handle the highpc and lowpc
attributes being inherited for the split unit DIE from the skeleton.

A new testcase is added to iterate over all ranges in a split GNU
DebugFission file.

Signed-off-by: Mark Wielaard <mark@klomp.org>
13 files changed:
libdw/ChangeLog
libdw/dwarf_formudata.c
libdw/dwarf_highpc.c
libdw/dwarf_lowpc.c
libdw/dwarf_ranges.c
libdw/libdwP.h
tests/ChangeLog
tests/Makefile.am
tests/all-dwarf-ranges.c [new file with mode: 0644]
tests/run-all-dwarf-ranges.sh [new file with mode: 0755]
tests/testfile-ranges-hello.dwo.bz2 [new file with mode: 0644]
tests/testfile-ranges-world.dwo.bz2 [new file with mode: 0644]
tests/testfilesplitranges4.debug.bz2 [new file with mode: 0755]