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.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73206/new/

https://reviews.llvm.org/D73206



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to