ikudrin added a comment. In D106466#2926185 <https://reviews.llvm.org/D106466#2926185>, @jankratochvil wrote:
> In D106466#2922549 <https://reviews.llvm.org/D106466#2922549>, @ikudrin wrote: > >> As far as I understand it, you need a specially constructed >> `llvm::DWARFDebugRnglistTable` object so that >> `DWARFUnit::FindRnglistFromOffset()` can call its `findList()` method and >> get a list of records located at a specific offset. > > Yes. > >> It looks like a newly created `llvm::DWARFDebugRnglistTable` object has its >> `Header.Length` set to `0`, > > But that is wrong `Length`, the correct one is to cover the whole section > which I set by: > > HeaderData.Length = Data.size() - dwarf::getUnitLengthFieldByteSize(Format); This value is not incorrect, but a special one, with custom handling. `DWARFUnit::findRnglistFromOffset(uint64_t Offset)` fetches the list without creating a fake header. >> so it already works as required for the usage, and there is no need to fill >> its fields with artificial values that do not represent real content of the >> section. Am I right? > > One needs to set at least `AddrSize` and `OffsetEntryCount` as callers do use > it. Could you please point me to that usage? I am not that familiar with the LLDB code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106466/new/ https://reviews.llvm.org/D106466 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits