[DebugInfo] follow up for "add SectionedAddress to DebugInfo interfaces"
authorAlexey Lapshin <a.v.lapshin@mail.ru>
Sat, 23 Mar 2019 08:08:40 +0000 (08:08 +0000)
committerAlexey Lapshin <a.v.lapshin@mail.ru>
Sat, 23 Mar 2019 08:08:40 +0000 (08:08 +0000)
commitb2c4b8bded3ff2efaaebe0d8b33c65116f9ef8de
treea3ad2ed0f7831c14ada39341079973bb2c02b71c
parente7f0455bd183b9472911351894e1e6faa4806b3d
  [DebugInfo] follow up for "add SectionedAddress to DebugInfo interfaces"

  [Symbolizer] Add getModuleSectionIndexForAddress() helper routine

  The https://reviews.llvm.org/D58194 patch changed symbolizer interface.
  Particularily it requires not only Address but SectionIndex also.
  Note object::SectionedAddress parameter:

  Expected<DILineInfo> symbolizeCode(const std::string &ModuleName,
                                   object::SectionedAddress ModuleOffset,
                                   StringRef DWPName = "");

  There are callers of symbolizer which do not know particular section index.
  That patch creates getModuleSectionIndexForAddress() routine which
  will detect section index for the specified address. Thus if caller
  set ModuleOffset.SectionIndex into object::SectionedAddress::UndefSection
  state then symbolizer would detect section index using
  getModuleSectionIndexForAddress routine.

  Differential Revision: https://reviews.llvm.org/D58848

llvm-svn: 356829
llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.h
llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp