[Lldb-commits] [PATCH] D59562: [SymbolFileDWARF] Introduce DWARFContext

Zachary Turner via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 19 14:18:17 PDT 2019

zturner created this revision.
zturner added reviewers: JDevlieghere, aprantl, clayborg.
Herald added subscribers: jdoerfert, mgorny.

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



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59562.191393.patch
Type: text/x-patch
Size: 10320 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190319/bc714145/attachment.bin>

More information about the lldb-commits mailing list