hanchenye-llvm-project/lldb/source
Zachary Turner 6e66512758 Introduce DWARFContext.
LLVM's DWARF parsing library has a class called DWARFContext which holds
all of the various DWARF data sections and lots of other information.
LLDB's on the other hand stores all of this directly in SymbolFileDWARF
/ SymbolFileDWARFDwo and passes this interface around through the
parsing library. Obviously this is incompatible with a world where the
low level interface does not depend on the high level interface, so we
need to move towards a model similar to LLVM's - i.e. all of the context
needed for low level parsing should be in a single class, and that class
gets passed around.

This patch is a small incremental step towards achieving this. The
interface and internals deviate from LLVM's for technical reasons, but
the high level idea is the same. The goal is, eventually, to remove all
occurrences of SymbolFileDWARF from the low level parsing code.

For now I've chosen a very simple section - the .debug_aranges section
to move into DWARFContext while leaving everything else unchanged. In
the short term this is a bit confusing because now the information you
need might come from either of 2 different locations. But it's a huge
refactor to do this all at once and runs a much higher risk of breaking
things. So I think it would be wise to do this in very small pieces.

TL;DR - No functional change

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

llvm-svn: 356612
2019-03-20 20:49:25 +00:00
..
API [lldb] [Reproducer] Move SBRegistry registration into declaring files 2019-03-19 17:13:13 +00:00
Breakpoint Pass ConstString by value (NFC) 2019-03-06 21:22:25 +00:00
Commands Quiet command regex instructions during batch execution 2019-03-10 23:15:48 +00:00
Core Fix a "memset clearing an object of non-trivial type" warning in EmulateInstruction 2019-03-19 15:05:55 +00:00
DataFormatters [DataFormatters] Remove LLDB_DISABLE_PYTHON from TypeCategory. 2019-03-15 16:55:51 +00:00
Expression Fix an invalid static cast in ClangExpressionParser.cpp 2019-03-13 19:46:30 +00:00
Host Make sure FileSystem::Resolve preserves the path/file distinction. 2019-03-13 15:54:18 +00:00
Initialization [Reproducers] Initialize reproducers before initializing the debugger. 2019-02-21 22:26:16 +00:00
Interpreter Pass ConstString by value (NFC) 2019-03-06 21:22:25 +00:00
Plugins Introduce DWARFContext. 2019-03-20 20:49:25 +00:00
Symbol Remove the unused return value in ASTImporter::Imported [NFC] 2019-03-20 19:00:25 +00:00
Target [StackFrameRecognizer] Remove unneeded LLDB_DISABLE_PYTHON. 2019-03-19 17:35:37 +00:00
Utility [Reproducers] Stop recording instead of deallocating 2019-03-12 17:10:28 +00:00
CMakeLists.txt [CMake] Unify scripts for generating VCS headers 2019-02-06 03:51:00 +00:00
lldb.cpp [CMake] Unify scripts for generating VCS headers 2019-02-06 03:51:00 +00:00