Re: [Dwarf-discuss] Proposal: Allow padding in all tables

2024-01-19 Thread David Anderson via Dwarf-discuss

On 1/19/24 06:51, Robinson, Paul via Dwarf-discuss wrote:

Couldn't the abbrev table simply be padded with 0 bytes?

Hmmm... that would appear to a dumper as a series of zero-length tables,
I suppose? Would look funny in a dump but it could work. And would be a
lot simpler for the producer of course.
--paulr


I think the zero-length-tables as padding sounds good.
The way the libdwarf's dwarfdump prints such abbrev padding
is not as nice as it should be, I'll fix that.

David Anderson
--
100 pains = 1 Megahertz

--
Dwarf-discuss mailing list
Dwarf-discuss@lists.dwarfstd.org
https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss


Re: [Dwarf-discuss] Proposal: Allow padding in all tables

2024-01-19 Thread Robinson, Paul via Dwarf-discuss
> > ### .debug_abbrev
> >
> > In Section 7.5.3 "Abbreviations Tables" (p.207), at the end of the
> section, add a new non-normative paragraph:
> >
> > *This table may be padded by adding an unused abbreviation entry. The
> minimum number of bytes in an abbreviation entry is four (abbreviation
> number, child flag, and two 0 bytes indicating the end of the
> attribute/form pairs). This can be expanded by choosing a large
> abbreviation number with a longer LEB128 encoding, or adding non-zero
> attribute/form pairs.*
> 
> Couldn't the abbrev table simply be padded with 0 bytes?

Hmmm... that would appear to a dumper as a series of zero-length tables,
I suppose? Would look funny in a dump but it could work. And would be a
lot simpler for the producer of course.
--paulr
-- 
Dwarf-discuss mailing list
Dwarf-discuss@lists.dwarfstd.org
https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss