OSDN Git Service

Recommit r303978 "[DWARF] - Make collectAddressRanges() return section index in addit...
authorGeorge Rimar <grimar@accesssoftek.com>
Fri, 26 May 2017 13:13:50 +0000 (13:13 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Fri, 26 May 2017 13:13:50 +0000 (13:13 +0000)
commit88aeae664a5779cfc71323bf01300a98de7e151f
tree89c3f8482c096bc9890738c0e57ae47b2ec3b7df
parent1503fe43e0ae34e6aa8cf4c115e01659d0d01a52
Recommit r303978 "[DWARF] - Make collectAddressRanges() return section index in addition to Low/High PC"

With fix of test compilation.

Initial commit message:

This change is intended to use for LLD in D33183.
Problem we have in LLD when building .gdb_index is that we need to know section
which address range belongs to.

Previously it was solved on LLD side by providing fake section addresses
with use of llvm::LoadedObjectInfo interface. We assigned file offsets as addressed.
Then after obtaining ranges lists, for each range we had to find section ID's.
That not only was slow, but also complicated implementation and was the reason
of incorrect behavior when
sections share the same offsets, like D33176 shows.

This patch makes DWARF parsers to return section index as well.
That solves problem mentioned above.

Differential revision: https://reviews.llvm.org/D33184

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303983 91177308-0d34-0410-b5e6-96231b3b80d8
18 files changed:
include/llvm/DebugInfo/DWARF/DWARFContext.h
include/llvm/DebugInfo/DWARF/DWARFDebugRangeList.h
include/llvm/DebugInfo/DWARF/DWARFDie.h
include/llvm/DebugInfo/DWARF/DWARFFormValue.h
include/llvm/DebugInfo/DWARF/DWARFRelocMap.h
include/llvm/Object/COFF.h
include/llvm/Object/ELFObjectFile.h
include/llvm/Object/MachO.h
include/llvm/Object/ObjectFile.h
include/llvm/Object/Wasm.h
lib/DebugInfo/DWARF/DWARFContext.cpp
lib/DebugInfo/DWARF/DWARFDebugRangeList.cpp
lib/DebugInfo/DWARF/DWARFDie.cpp
lib/DebugInfo/DWARF/DWARFFormValue.cpp
lib/Object/COFFObjectFile.cpp
lib/Object/MachOObjectFile.cpp
lib/Object/WasmObjectFile.cpp
unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp