[PATCH] D33184: [DWARF] - Make collectAddressRanges() return senction index in addition to Low/High PC

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 15 03:44:55 PDT 2017


grimar created this revision.
Herald added a subscriber: sbc100.

This change is intended to use for LLD in https://reviews.llvm.org/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 https://reviews.llvm.org/D33176 shows.

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


https://reviews.llvm.org/D33184

Files:
  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/DWARFDebugAranges.cpp
  lib/DebugInfo/DWARF/DWARFDebugRangeList.cpp
  lib/DebugInfo/DWARF/DWARFDie.cpp
  lib/DebugInfo/DWARF/DWARFFormValue.cpp
  lib/DebugInfo/DWARF/DWARFUnit.cpp
  lib/Object/COFFObjectFile.cpp
  lib/Object/MachOObjectFile.cpp
  lib/Object/WasmObjectFile.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33184.98973.patch
Type: text/x-patch
Size: 19446 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170515/0a4cb216/attachment.bin>


More information about the llvm-commits mailing list