[all-commits] [llvm/llvm-project] f9cd90: [llvm-dwp] Refactor handling of section identifier...

Igor Kudrin via All-commits all-commits at lists.llvm.org
Mon Apr 6 00:04:30 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f9cd90837bdced66c933349b402c322f7198ddfe
      https://github.com/llvm/llvm-project/commit/f9cd90837bdced66c933349b402c322f7198ddfe
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2020-04-06 (Mon, 06 Apr 2020)

  Changed paths:
    M llvm/tools/llvm-dwp/llvm-dwp.cpp

  Log Message:
  -----------
  [llvm-dwp] Refactor handling of section identifiers. NFCI.

There is a number of places in llvm-dwp.cpp where a section identifier
is translated into an index of an internal array of section
contributions, and another place where the index is converted to an
on-disk value. All these places use direct expressions like
"<id> - DW_SECT_INFO" or "<index> + DW_SECT_INFO", exploiting the fact
that DW_SECT_INFO is the minimum valid value of that kind.

The patch adds distinct functions for that translation. The goal is to
make the code more readable and to prepare it to support index sections
of new versions, where the numeric scheme of section indexes is changed.

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


  Commit: a0249fe91c7ba0dabf0e8789171fb4aea5fca1cb
      https://github.com/llvm/llvm-project/commit/a0249fe91c7ba0dabf0e8789171fb4aea5fca1cb
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2020-04-06 (Mon, 06 Apr 2020)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
    M llvm/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h
    M llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFUnitIndex.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
    M llvm/tools/llvm-dwp/llvm-dwp.cpp

  Log Message:
  -----------
  [DebugInfo] Rename section identifiers which are deprecated in DWARFv5. NFC.

This is a preparation for an upcoming patch which adds support for
DWARFv5 unit index sections. The patch adds tag "_EXT_" to identifiers
which reference sections that are deprecated in the DWARFv5 standard.
See D75929 for the discussion.

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


  Commit: 714324b79ae2d05bedfbbb061cfbff4645e6e01b
      https://github.com/llvm/llvm-project/commit/714324b79ae2d05bedfbbb061cfbff4645e6e01b
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2020-04-06 (Mon, 06 Apr 2020)

  Changed paths:
    M llvm/include/llvm/BinaryFormat/Dwarf.def
    M llvm/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h
    M llvm/lib/DebugInfo/DWARF/DWARFUnitIndex.cpp
    A llvm/test/DebugInfo/X86/dwp-v2-cu-index.s
    A llvm/test/DebugInfo/X86/dwp-v2-tu-index.s
    A llvm/test/DebugInfo/X86/dwp-v5-cu-index.s
    A llvm/test/DebugInfo/X86/dwp-v5-tu-index.s
    M llvm/tools/llvm-dwp/llvm-dwp.cpp

  Log Message:
  -----------
  [DebugInfo] Support DWARFv5 index sections.

DWARFv5 defines index sections in package files in a slightly different
way than the pre-standard GNU proposal, see Section 7.3.5 in the DWARF
standard and https://gcc.gnu.org/wiki/DebugFissionDWP for GNU proposal.
The main concern here is values for section identifiers, which are
partially overlapped with changed meanings. The patch adds support for
v5 index sections and resolves that difficulty by defining a set of
identifiers for internal use which can represent and distinct values
of both standards.

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


  Commit: 49737df7679347aea59d891e82350a057f1a03c7
      https://github.com/llvm/llvm-project/commit/49737df7679347aea59d891e82350a057f1a03c7
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2020-04-06 (Mon, 06 Apr 2020)

  Changed paths:
    M llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
    A llvm/test/DebugInfo/X86/dwp-v2-loc.s
    A llvm/test/DebugInfo/X86/dwp-v5-loclists.s

  Log Message:
  -----------
  [DebugInfo] Fix reading location tables of v5 units in DWP.

Without the patch, all version 5 compile units in a DWP file read
location tables from the beginning of a .debug_loclists.dwo section.
The patch fixes that by adjusting the reading offset the same way as
for pre-v5 units. The section identifier to find the contribution
entry corresponds to the version of the unit.

Differential revision: https://reviews.llvm.org/D77145


  Commit: a93b77b97f105db911316d896056dc8718a850e3
      https://github.com/llvm/llvm-project/commit/a93b77b97f105db911316d896056dc8718a850e3
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2020-04-06 (Mon, 06 Apr 2020)

  Changed paths:
    M llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
    M llvm/test/DebugInfo/X86/dwp-v5-loclists.s

  Log Message:
  -----------
  [DebugInfo] Fix reading location tables headers of v5 units in DWP.

This fixes the reading of location lists headers for compilation units
in package files by adjusting the reading offset according to the
corresponding record in the unit index. This is required for
DW_FORM_loclistx to work.

Differential revision: https://reviews.llvm.org/D77146


  Commit: 35819ff3cf4cfa3f40be19f5bbfc84d0d9f1f8d7
      https://github.com/llvm/llvm-project/commit/35819ff3cf4cfa3f40be19f5bbfc84d0d9f1f8d7
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2020-04-06 (Mon, 06 Apr 2020)

  Changed paths:
    M llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
    A llvm/test/DebugInfo/X86/dwp-v5-rnglists.s

  Log Message:
  -----------
  [DebugInfo] Fix reading range lists of v5 units in DWP.

In package files, the base offset provided by index sections should be
used to find the contribution of a unit. The patch adds that base
offset when reading range list tables.

Differential revision: https://reviews.llvm.org/D77401


Compare: https://github.com/llvm/llvm-project/compare/6163aa96799c...35819ff3cf4c


More information about the All-commits mailing list