[all-commits] [llvm/llvm-project] 613336: Don't index the skeleton CU when we have a fission...

Greg Clayton via All-commits all-commits at lists.llvm.org
Thu Aug 25 14:48:42 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 613336da8ce16bd2e998e77e02eaf5866ad7e311
      https://github.com/llvm/llvm-project/commit/613336da8ce16bd2e998e77e02eaf5866ad7e311
  Author: Greg Clayton <gclayton at fb.com>
  Date:   2022-08-25 (Thu, 25 Aug 2022)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.h
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h
    M lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
    A lldb/test/API/functionalities/dwo/TestZeroDwoId.py
    A lldb/test/API/functionalities/dwo/main.dwo.yaml
    A lldb/test/API/functionalities/dwo/main.o.yaml

  Log Message:
  -----------
  Don't index the skeleton CU when we have a fission compile unit.

When fission is enabled, we were indexing the skeleton CU _and_ the .dwo CU. Issues arise when users enable compiler options that add extra data to the skeleton CU (like -fsplit-dwarf-inlining) and there can end up being types in the skeleton CU due to template parameters. We never want to index this information since the .dwo file has the real definition, and we really don't want function prototypes from this info since all parameters are removed. The index doesn't work correctly if it does index the skeleton CU as the DIE offset will assume it is from the .dwo file, so even if we do index the skeleton CU, the index entries will try and grab information from the .dwo file using the wrong DIE offset which can cause errors to be displayed or even worse, if the DIE offsets is valid in the .dwo CU, the wrong DIE will be used.

We also fix DWO ID detection to use llvm::Optional<uint64_t> to make sure we can load a .dwo file with a DWO ID of zero.

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




More information about the All-commits mailing list