[Lldb-commits] [PATCH] D96778: [lldb] Fix handling of `DW_AT_decl_file` according to D91014

Jan Kratochvil via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sat Feb 20 12:24:32 PST 2021


jankratochvil added a comment.

In D96778#2576881 <https://reviews.llvm.org/D96778#2576881>, @dblaikie wrote:

> In D96778#2573076 <https://reviews.llvm.org/D96778#2573076>, @jankratochvil wrote:
>
>> Personally I am not interested in DWZ, I am implementing it only as a compatibility with existing file format, IMNSHO DWZ should be dropped.
>
> Not sure I follow. dwz does use the existing DWARF file format. you mean you're only interested in compatibility with the DWARF directly produced by compilers, not post-processed by dwz? Fair enough. I guess @werat has some interest in supporting dwz for their use cases.

No, I need compatibility of LLDB with DWZ (or rather LLDB needs it if it should get used on Red Hat systems). DWZ is specified by DWARF-5 but there are various DWARF tools still not supporting DWZ. Also the only DWZ format currently in use is a non-standard GNU extension of DWARF-4. The DWZ format has been designed for GDB making it difficult to parse it by LLDB. LLDB does per-DIE DWARF->IR conversion compared to GDB doing per-CU DWARF->IR conversion, that means that LLDB needs to keep context of the DWZ parent DIE (as DWZ recursively imports DW_TAG_partial_unit) for each its reference of DIE in its various indices which is a PITA. One cannot parse a PU (partial unit) without knowing which CU did import it. `-fdebug-types-section` brings most of the size savings of DWZ but unfortunately not all of it. I tried to drop DWZ for Fedora in exchange of `-fdebug-types-section` but I failed, there is too strong push for DWZ. From the mail thread one can see they try hard to find any little benefits of DWZ ignoring any its disadvantages: Fedora change proposal <https://fedoraproject.org/wiki/Changes/DebugInfoStandardization> + its fedora-devel mail thread <https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/HFMALNUAFJVEEEAIBLA45R5MFVXHVUUG/>
DWZ format could be fixed for better consumption by intelligent consumers like LLDB but then Red Hat wants compatibility with existing flawed DWZ format being already present in RHEL-7/8/9 anyway. That means I would have to implement two different DWZ file formats LLDB compatibility so I rather implemented only the only existing DWZ format (D96236 <https://reviews.llvm.org/D96236> D96237 <https://reviews.llvm.org/D96237> D96238 <https://reviews.llvm.org/D96238> D96239 <https://reviews.llvm.org/D96239> D96240 <https://reviews.llvm.org/D96240> D96241 <https://reviews.llvm.org/D96241> D96242 <https://reviews.llvm.org/D96242> D96243 <https://reviews.llvm.org/D96243>) and hopefully Fedora+RHEL will rather drop DWZ in the future.
(Currently I am blocked by some clang assertion for testsuite running in DWZ mode with libc++ - the assertion does not happen with libc++ without DWZ mode nor with libstdc++ in DWZ mode.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96778



More information about the lldb-commits mailing list