[PATCH] D137657: [DWARFLibrary] Add support to re-construct cu-index
Alexander Yermolovich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 9 09:53:44 PST 2022
ayermolo added inline comments.
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFContext.cpp:819-820
+ // to do anything.
+ if (Header.getVersion() == 4 && type == IndexType::TUIndex)
+ break;
+
----------------
dblaikie wrote:
> I'm a bit more worried about implementing this for DWARFv4 due to needing to rebuild .debug_abbrev sections together, which is less reliable/guaranteed (there's no guarantee that the abbrev contributions are written in the same order as the .debug_info sections - though it's the case in reality I guess) than .debug_info parsing.
>
> Any chance this workaround can be restricted to only DWARFv5?
I would prefer to keep it more generic and include DWARF4. Part of the reason is that we still heavily rely on DWARF4.
One thing we can do is that if DWOID is "garbage". As in when we populate CU Index and can't find the signature in a map we stop.
With the current implementation we can just clear the map and parse CU/TU index as before. If we move implementation of updating contributions entires after parsing we just stop updating further. I think with this approach we can handle the common case of how things are now in reality, and on of chance the assumption fails we are no worse than we were before. Although it does assume that with wrong abbrev. getDWOID doesn't crash.... What do you think?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137657/new/
https://reviews.llvm.org/D137657
More information about the llvm-commits
mailing list