[LLDB] - Improve the support of .debug_str_offsets/.debug_str_offsets.dwo
authorGeorge Rimar <grimar@accesssoftek.com>
Thu, 29 Nov 2018 12:44:10 +0000 (12:44 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Thu, 29 Nov 2018 12:44:10 +0000 (12:44 +0000)
commitc1d3f71344bfb207f843ec569b025443a5785a45
treec2123fc7098467864272891ca6799bdf94059044
parenta876b5c0f5d6a522ad3020149599a4e4d5330fb9
[LLDB] - Improve the support of .debug_str_offsets/.debug_str_offsets.dwo

A skeleton compilation unit may contain the DW_AT_str_offsets_base attribute
that points to the first string offset of the CU contribution to the
.debug_str_offsets. At the same time, when we use split dwarf,
the corresponding split debug unit also
may use DW_FORM_strx* forms pointing to its own .debug_str_offsets.dwo.
In that case, DWO does not contain DW_AT_str_offsets_base, but LLDB
still need to know and skip the .debug_str_offsets.dwo section header to
access the offsets.

The patch implements the support of DW_AT_str_offsets_base.

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

llvm-svn: 347859
lldb/lit/Breakpoint/Inputs/split-dwarf5-debug-stroffsets-file1.dwo.yaml [new file with mode: 0644]
lldb/lit/Breakpoint/Inputs/split-dwarf5-debug-stroffsets-file2.dwo.yaml [new file with mode: 0644]
lldb/lit/Breakpoint/Inputs/split-dwarf5-debug-stroffsets-main.yaml [new file with mode: 0644]
lldb/lit/Breakpoint/split-dwarf5-debug-stroffsets.test [new file with mode: 0644]
lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h