[Dwarf-discuss] [UPDATE] 240618.2 rnglists_base missing
David Blaikie
dblaikie@gmail.com
Tue Jan 14 17:31:53 GMT 2025
On Mon, Jan 13, 2025 at 4:56 PM David Anderson <davea42@linuxmail.org>
wrote:
> On 1/13/25 11:31, David Blaikie wrote:
> > I still think the commentary on the indexes isn't quite right. They're
> > separate from this issue - you'd still need the rnglists base, or have
> > to assume that it's sizeof(header), to go that far into the region
> > described by the index.
> >
> > The index essentially makes a DWP look like a bunch of separate DWO
> > files - so the rules that apply to the DWO file apply equally to the DWP
> > file.
>
> If I understand correctly, the offset in .debug_cu_index (for example,
> say DW_SECT_RNGLISTS) is
> a section offset of the rnglists contribution of a CU.
>
> So one does not need the rnglists_base, it can be calculated by reading
> the header whose offset is given by the header.
> I expect any reader would note and remember the offsets table offset on
> reading .debug_cu_index.
>
> So, if .debug_cu_index is present (so this
> is from a package file) and therefore has the rnglists contribution
> offset, why would rnglists_base be needed?
>
All I'm saying is the same logic applies for the DWO file as it does for
the DWP file - if you want to think of that logic as "read from the start
of the section and expect to find, immediately, one header, followed by the
indexed offsets, etc" or "assume there is an implicity offsets_base equal
to the size of the header" I don't feel strongly about, since they're
roughly equivalent (short of some dastardly emitter that decided to emit
garbage instead of the header - in which case the latter works and the
former does not).
but they apply equally to the dwo file as they do to the dwp - it's the
same situation, only applied within the region described by the cu_index
(the cu_index essentially creates a series of "virtual" dwo files from the
contents of the DWP, with quick hash-based lookup, and shared strings)
>
> Not feeling totally comfortable about this.
> DavidA
> --
> If it weren't for Philo T. Farnsworth, inventor
> of television, we'd still be eating frozen radio
> dinners. -- Johnny Carson
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dwarfstd.org/pipermail/dwarf-discuss/attachments/20250114/74488081/attachment.htm>
More information about the Dwarf-discuss
mailing list