[all-commits] [llvm/llvm-project] f5767e: [lldb/DWARF] Switch to llvm debug_rnglists parser

Pavel Labath via All-commits all-commits at lists.llvm.org
Thu Dec 5 04:10:10 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f5767e284beaff4e5eb35f0f64270a070b47f6d3
      https://github.com/llvm/llvm-project/commit/f5767e284beaff4e5eb35f0f64270a070b47f6d3
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2019-12-05 (Thu, 05 Dec 2019)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
    M lldb/test/Shell/SymbolFile/DWARF/debug_rnglists.s

  Log Message:
  -----------
  [lldb/DWARF] Switch to llvm debug_rnglists parser

Summary:
Our rnglist support was working only for the trivial cases (one CU),
because we only ever parsed one contribution out of the debug_rnglists
section. This means we were never able to resolve range lists for the
second and subsequent units (DW_FORM_sec_offset references came out
blang, and DW_FORM_rnglistx references always used the ranges lists from
the first unit).

Since both llvm and lldb rnglist parsers are sufficiently
self-contained, and operate similarly, we can fix this problem by
switching to the llvm parser instead. Besides the changes which are due
to variations in the interface, the main thing is that now the range
list object is a member of the DWARFUnit, instead of the entire symbol
file. This ensures that each unit can get it's own private set of range
list indices, and is consistent with how llvm's DWARFUnit does it
(overall, I've tried to structure the code the same way as the llvm
version).

I've also added a test case for the two unit scenario.

Reviewers: JDevlieghere, aprantl, clayborg

Subscribers: dblaikie, lldb-commits

Tags: #lldb

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




More information about the All-commits mailing list