[LLDB] - Support the single file split DWARF.
authorGeorge Rimar <grimar@accesssoftek.com>
Wed, 14 Nov 2018 10:35:14 +0000 (10:35 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Wed, 14 Nov 2018 10:35:14 +0000 (10:35 +0000)
commit98963db57d04d38f154ca37b9c8c768da1697222
treeb370beb218f5704b7512d6494fa6bdce7635df4e
parent814e7974c64c977960c4913a117bf59af005865b
[LLDB] - Support the single file split DWARF.

DWARF5 spec describes a single file split dwarf case
(when .dwo sections are in the .o files).

Problem is that LLDB does not work correctly in that case.
The issue is that, for example, both .debug_info and .debug_info.dwo
has the same type: eSectionTypeDWARFDebugInfo. And when code searches
section by type it might find the regular debug section
and not the .dwo one.

The patch fixes that. With it, LLDB is able to work with
output compiled with -gsplit-dwarf=single flag correctly.

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

llvm-svn: 346848
lldb/include/lldb/lldb-enumerations.h
lldb/lit/Breakpoint/Inputs/single-file-split-dwarf.o.yaml [new file with mode: 0644]
lldb/lit/Breakpoint/Inputs/single-file-split-dwarf.yaml [new file with mode: 0644]
lldb/lit/Breakpoint/single-file-split-dwarf.test [new file with mode: 0644]
lldb/source/Core/Section.cpp
lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h
lldb/source/Symbol/ObjectFile.cpp