[llvm-symbolizer] Fix parsing DW_AT_ranges in Fission skeleton compile unit DIEs.
authorAlexey Samsonov <vonosmas@gmail.com>
Thu, 12 Jun 2014 18:52:35 +0000 (18:52 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Thu, 12 Jun 2014 18:52:35 +0000 (18:52 +0000)
commitf0e4034c425dd947f5373a29ebbf8b8912da01e8
tree6b742c14d14df0c73a12917da016ec3690adb279
parent6823a0b6781b92861ce5c83aed696b2c71979d3c
[llvm-symbolizer] Fix parsing DW_AT_ranges in Fission skeleton compile unit DIEs.

Turns out that DW_AT_ranges_base attribute sets the offset for
DW_AT_ranges values specified in the .dwo file, but not for DW_AT_ranges specified
in the skeleton compile unit DIE in the main executable. This is extremely confusing,
and would hopefully be fixed in DWARF-5 when it's finalized. For now this
behavior makes sense, as otherwise Fission would break DWARF consumers who
doesn't know anything about DW_AT_ranges_base.

llvm-svn: 210809
llvm/lib/DebugInfo/DWARFUnit.cpp
llvm/test/DebugInfo/Inputs/fission-ranges.cc [new file with mode: 0644]
llvm/test/DebugInfo/Inputs/fission-ranges.elf-x86_64 [new file with mode: 0755]
llvm/test/DebugInfo/llvm-symbolizer.test