lldb: Add support for DW_AT_ranges on DW_TAG_subprograms
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 5 Jan 2021 06:44:59 +0000 (22:44 -0800)
committerDavid Blaikie <dblaikie@gmail.com>
Thu, 7 Jan 2021 22:28:03 +0000 (14:28 -0800)
commit274afac9a17f43e5396a0d6c7a0741702596a7bd
tree473646c2f007040cf1d09110f208a7311fa9abf1
parenteaadb41db6233cf1c9e882d74a31c1f9d6e211ff
lldb: Add support for DW_AT_ranges on DW_TAG_subprograms

gcc already produces debug info with this form
-freorder-block-and-partition
clang produces this sort of thing with -fbasic-block-sections and with a
coming-soon tweak to use ranges in DWARFv5 where they can allow greater
reuse of debug_addr than the low/high_pc forms.

This fixes the case of breaking on a function name, but leaves broken
printing a variable - a follow-up commit will add that and improve the
test case to match.

Differential Revision: https://reviews.llvm.org/D94063
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
lldb/test/Shell/SymbolFile/DWARF/Inputs/subprogram_ranges.s [new file with mode: 0644]
lldb/test/Shell/SymbolFile/DWARF/subprogram_ranges.test [new file with mode: 0644]