This patch considers the CU index entry
when reading the .debug_rnglists.dwo section.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp | ||
---|---|---|
519 | Here could be an error message. | |
537 | I have found this getContribution adjustment duplication, are there some reasons it is not unified? https://www.jankratochvil.net/t/D107456-unify.patch | |
556 | One such reason can be missing DWP absolute offset for the error report. That could be returned from GetRnglistData(). |
Thanks a lot for the review! Very sorry for my late update, I was out on vacation and then had to catch up with mails. Updated the revision now.
lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp | ||
---|---|---|
537 | Thanks a lot for the patch, I unified it in the latest update. IIRC (some time ago, so I don't recall completely) there was a mismatch in offsets maybe because I missed to update GetRnglistOffset to use getRnglistData too. | |
556 | If I understand your comment correctly, you are suggesting to incorporate the contribution offset into the error message of GetRnglistData, is that correct? However, GetRnglistData will only return an error message if the contribution offset cannot be read, so the contribution offset cannot be specified in the error message (and thus the absolute offset cannot be inferred) . Or maybe I'm misunderstanding your comment here? |
lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp | ||
---|---|---|
556 | Not so correct. The callers of GetRnglistData need to know the contribution offset to properly report it during parsing errors in the callers. GetRnglistTable can report error if extractHeaderAndOffsets finds invalid header data. In such case LLDB will report (with https://www.jankratochvil.net/t/debug_rnglists-dwp.s.patch): error: debug_rnglists-dwp.s.tmp Failed to extract range list table at offset 0xc: parsing .debug_rnglists table at offset 0x0: unsupported reserved unit length of value 0xfffffff0 And one has no idea which DWO in that DWP file was invalid, that 0xc is relative to start of contribution, not to start of the .debug_rnglists.dwo section. GetRnglistData knows the contribution offset but its caller DWARFDebugRnglistTable does not. |
lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp | ||
---|---|---|
556 | Ahh, okay, thanks a lot for the clarification! I updated a patch to address the error message. Please take a look if the updated patch is what you'd like to see. |
- splitting up new code (for error handling) into a different CL
- keep code that was already accepted
I've split up the code that addresses the .debug_rnglists from the code that takes care of better error handling (https://reviews.llvm.org/D109231). I'll commit the reviewed part (this).
Here could be an error message.