[Lldb-commits] [PATCH] D73206: `DWARFASTParserClang::m_decl_ctx_to_die` `DWARFDIE`->`DIERef` for DWZ
Jan Kratochvil via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Jan 23 14:51:42 PST 2020
jankratochvil added a comment.
In D73206#1837138 <https://reviews.llvm.org/D73206#1837138>, @clayborg wrote:
> Is this something we can store in the DWARFUnit? Seems like it would be nice to be able to ask the DWARFUnit for its DWZ Unit? Then no changes are needed to DWARFDie since it could get the language by checking the DWARFUnit first and then fall back to the DWZ DwarfUnit that is a member of the first DWARFUnit?
`DWARFDebugInfoEntry` is a part of `DWARFPartialUnit::m_die_array` (`DWARFPartialUnit`=`DW_TAG_partial_unit`). One `DWARFPartialUnit` can be (and it is in real world DWZ debuginfos) included (by `DW_TAG_imported_unit::DW_AT_import`) into two different `DW_TAG_compile_unit`s each having different `DW_TAG_compile_unit::DW_AT_language`.
So no, the language cannot be stored in any `DWARFUnit` and neither in `DWARFDebugInfoEntry`. Unless we make a new copy of `DWARFPartialUnit` for each `DW_TAG_imported_unit::DW_AT_import` which was my former implementation (2) <https://lists.llvm.org/pipermail/lldb-dev/2019-October/015696.html> which you turned down as needlessly ineffective.
Your follow-up is appreciated.
(I need to prepare more my reply to @labath.)
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the lldb-commits