OSDN Git Service

[DebugInfo] add SectionedAddress to DebugInfo interfaces.
authorAlexey Lapshin <a.v.lapshin@mail.ru>
Wed, 27 Feb 2019 13:17:36 +0000 (13:17 +0000)
committerAlexey Lapshin <a.v.lapshin@mail.ru>
Wed, 27 Feb 2019 13:17:36 +0000 (13:17 +0000)
commita15cff122c43af6b4d13a189bece7a369ab0829e
tree71713452601abe17d010ad5111e26463c52bbd60
parentea85a46c1e2e364ebbb328addfd5726d626590c4
[DebugInfo] add SectionedAddress to DebugInfo interfaces.

      That patch is the fix for https://bugs.llvm.org/show_bug.cgi?id=40703
   "wrong line number info for obj file compiled with -ffunction-sections"
   bug. The problem happened with only .o files. If object file contains
   several .text sections then line number information showed incorrectly.
   The reason for this is that DwarfLineTable could not detect section which
   corresponds to specified address(because address is the local to the
   section). And as the result it could not select proper sequence in the
   line table. The fix is to pass SectionIndex with the address. So that it
   would be possible to differentiate addresses from various sections. With
   this fix llvm-objdump shows correct line numbers for disassembled code.

   Differential review: https://reviews.llvm.org/D58194

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354972 91177308-0d34-0410-b5e6-96231b3b80d8
44 files changed:
include/llvm/DebugInfo/DIContext.h
include/llvm/DebugInfo/DWARF/DWARFContext.h
include/llvm/DebugInfo/DWARF/DWARFDebugLine.h
include/llvm/DebugInfo/DWARF/DWARFDebugRangeList.h
include/llvm/DebugInfo/DWARF/DWARFDebugRnglists.h
include/llvm/DebugInfo/DWARF/DWARFFormValue.h
include/llvm/DebugInfo/DWARF/DWARFListTable.h
include/llvm/DebugInfo/DWARF/DWARFSection.h
include/llvm/DebugInfo/DWARF/DWARFUnit.h
include/llvm/DebugInfo/PDB/PDBContext.h
include/llvm/DebugInfo/Symbolize/SymbolizableModule.h
include/llvm/DebugInfo/Symbolize/Symbolize.h
include/llvm/Object/ObjectFile.h
lib/DebugInfo/DWARF/DWARFContext.cpp
lib/DebugInfo/DWARF/DWARFDataExtractor.cpp
lib/DebugInfo/DWARF/DWARFDebugLine.cpp
lib/DebugInfo/DWARF/DWARFDebugRangeList.cpp
lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp
lib/DebugInfo/DWARF/DWARFDie.cpp
lib/DebugInfo/DWARF/DWARFFormValue.cpp
lib/DebugInfo/DWARF/DWARFUnit.cpp
lib/DebugInfo/DWARF/DWARFVerifier.cpp
lib/DebugInfo/PDB/PDBContext.cpp
lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
lib/DebugInfo/Symbolize/SymbolizableObjectFile.h
lib/DebugInfo/Symbolize/Symbolize.cpp
test/tools/llvm-objdump/X86/function-sections-line-numbers.s [new file with mode: 0644]
tools/dsymutil/DwarfLinker.cpp
tools/dsymutil/DwarfStreamer.cpp
tools/llvm-cfi-verify/lib/FileAnalysis.cpp
tools/llvm-cfi-verify/lib/FileAnalysis.h
tools/llvm-cfi-verify/lib/GraphBuilder.cpp
tools/llvm-cfi-verify/lib/GraphBuilder.h
tools/llvm-cfi-verify/llvm-cfi-verify.cpp
tools/llvm-dwarfdump/llvm-dwarfdump.cpp
tools/llvm-objdump/MachODump.cpp
tools/llvm-objdump/llvm-objdump.cpp
tools/llvm-rtdyld/llvm-rtdyld.cpp
tools/llvm-symbolizer/llvm-symbolizer.cpp
tools/llvm-xray/func-id-helper.cpp
tools/sancov/sancov.cpp
tools/sanstats/sanstats.cpp
unittests/tools/llvm-cfi-verify/FileAnalysis.cpp
unittests/tools/llvm-cfi-verify/GraphBuilder.cpp