[PATCH] D58194: [DebugInfo] add SectionedAddress to DebugInfo interfaces.

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 13 10:14:10 PST 2019


alexey.lapshin created this revision.
alexey.lapshin added reviewers: jhenderson, grimar, ruiu.
Herald added subscribers: jdoerfert, rupprecht, mgrang, hiraditya, arichardson, aprantl, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.

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.


https://reviews.llvm.org/D58194

Files:
  lld/ELF/InputFiles.cpp
  llvm/include/llvm/DebugInfo/DIContext.h
  llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
  llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h
  llvm/include/llvm/DebugInfo/PDB/PDBContext.h
  llvm/include/llvm/DebugInfo/Symbolize/SymbolizableModule.h
  llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h
  llvm/include/llvm/Object/ObjectFile.h
  llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
  llvm/lib/DebugInfo/DWARF/DWARFDataExtractor.cpp
  llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
  llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
  llvm/lib/DebugInfo/PDB/PDBContext.cpp
  llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
  llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.h
  llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
  llvm/test/tools/llvm-objdump/Inputs/function-sections-line-numbers.cpp
  llvm/test/tools/llvm-objdump/function-sections-line-numbers.test
  llvm/tools/llvm-cfi-verify/lib/FileAnalysis.cpp
  llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h
  llvm/tools/llvm-cfi-verify/lib/GraphBuilder.cpp
  llvm/tools/llvm-cfi-verify/lib/GraphBuilder.h
  llvm/tools/llvm-cfi-verify/llvm-cfi-verify.cpp
  llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
  llvm/tools/llvm-objdump/MachODump.cpp
  llvm/tools/llvm-objdump/llvm-objdump.cpp
  llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
  llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp
  llvm/tools/llvm-xray/func-id-helper.cpp
  llvm/tools/sancov/sancov.cpp
  llvm/tools/sanstats/sanstats.cpp
  llvm/unittests/tools/llvm-cfi-verify/FileAnalysis.cpp
  llvm/unittests/tools/llvm-cfi-verify/GraphBuilder.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58194.186686.patch
Type: text/x-patch
Size: 90632 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190213/59f6183e/attachment-0001.bin>


More information about the llvm-commits mailing list