[Dwarf-discuss] Proposal: Clarify Description of Line Table Compression

Cary Coutant ccoutant@gmail.com
Wed Mar 20 19:30:29 GMT 2024


This is a proposal to clarify the description of line table compression,
all in non-normative text.

Added as Issue 240320.2 <https://dwarfstd.org/issues/240320.2.html>.

-cary

## Background

Technically, the DWARF spec doesn't really describe the compression
technique used for line table rows correctly. The non-normative text at
the beginning of Section 6.2 says:

> We shrink it with two techniques. First, we delete from the matrix each
> row whose file, line, source column and discriminator is identical with
> that of its predecessors. Any deleted row would never be the beginning
> of a source statement. Second, ….

This isn't quite right — the `is_stmt` flag doesn't mark the beginning of
a source statement; it marks a suggested breakpoint location, which may
not be the first instruction of the statement. So it's quite possible
that a row with `is_stmt = false` could be followed by a row with `is_stmt
= true`, whose file, line, source column, and discriminator are identical
with the first. So really, we should say that no row where `is_stmt =
true` can be deleted. Likewise, `prologue_end` and `epilogue_begin` have the
same effect — they apply to a single instruction, but not to the
instructions in any following rows that were elided.

## Proposed Changes

In Section 6.2, replace the sentences quoted above with the following:

> We shrink it with two techniques. First, we delete from the matrix each
> row whose file, line, source column and discriminator is identical with
> that of its predecessors, except where the instruction is marked as
> a suggested breakpoint location, the end of a prologue region, or the
> beginning of an epilogue region. Second, …..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dwarfstd.org/pipermail/dwarf-discuss/attachments/20240320/abb76067/attachment.htm>


More information about the Dwarf-discuss mailing list