kimanh added inline comments.
================ Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp:556 + " (ranges list base: 0x%" PRIx64 "): %s", + offset, m_ranges_base, toString(table_or_error.takeError()).c_str()); } ---------------- jankratochvil wrote: > kimanh wrote: > > jankratochvil wrote: > > > One such reason can be missing DWP absolute offset for the error report. > > > That could be returned from `GetRnglistData()`. > > > > > 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? > 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. > I am not sure how perfect the error messages should be so giving an approval > (if I am authorized to give one) but it would be nice to improve the error > reporting. > 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. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107456/new/ https://reviews.llvm.org/D107456 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits