[Lldb-commits] [PATCH] D70647: RFC 3/3: Remove DWARFDIE dependency from functions moved by D70646

Jan Kratochvil via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Nov 24 13:20:43 PST 2019


jankratochvil created this revision.
jankratochvil added a reviewer: labath.
jankratochvil added a project: LLDB.
Herald added subscribers: arphaman, aprantl.
Herald added a reviewer: jdoerfert.
Herald added a reviewer: shafik.
jankratochvil added a parent revision: D70646: RFC 2/3: Move non-DWARF code: `DWARFUnit` -> `SymbolFileDWARF`.

This patchset is removing dependency on `DWARFDIE`'s `DWARFUnit *m_cu` for stuff which is unavailable in `DW_TAG_partial_unit` without accessing its parent `DW_TAG_compile_unit` (which includes `DW_TAG_partial_unit` by `DW_AT_import`).
This patch has no regressions but to really make it usable for DWZ one still needs to adjust `DWARFBaseDIE::GetDIERef()` as one cannot generate `DIERef` (containing main unit idenitifier for DWZ) purely from `DWARFDIE` (not containing `DWARFUnit *main_cu`).
Refactored `DWARFBaseDIE::GetDIERef()` (adding some parameter) would then need adjustment also of functions calling it directly - `DWARFBaseDIE::GetID()` and `SymbolFileDWARF::GetUID(const DWARFBaseDIE &die)` (and many functions calling these).
I do not plan to check it in yet. I plan to finish it for use by DWZ patchset first (D40474 <https://reviews.llvm.org/D40474> et al.). Asking whether this is a good way forward.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70647

Files:
  lldb/include/lldb/Symbol/ClangASTContext.h
  lldb/include/lldb/Symbol/TypeSystem.h
  lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.h
  lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
  lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h
  lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.cpp
  lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.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/ClangASTContext.cpp
  lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70647.230822.patch
Type: text/x-patch
Size: 38117 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191124/5f491595/attachment-0001.bin>


More information about the lldb-commits mailing list