[Dwarf-Discuss] end_seq row at same address as previous row

Tom de Vries tdevries@suse.de
Thu Jul 9 18:18:13 GMT 2020


Hi,

I came across the following line table program in gdb test-case
dw2-ranges-base.exp:
...
$ readelf -wl outputs/gdb.dwarf2/dw2-ranges-base/dw2-ranges-base

 Line Number Statements:
  [0x00000154]  Extended opcode 2: set Address to 0x4004ba
  [0x0000015f]  Advance Line by 10 to 11
  [0x00000161]  Copy
  [0x00000162]  Advance PC by 12 to 0x4004c6
  [0x00000164]  Advance Line by 19 to 30
  [0x00000166]  Copy
  [0x00000167]  Extended opcode 1: End of Sequence
...

My understanding of this is as follows.

The Copy followed by End-of-Sequence is incorrect.

Both the Copy and the End-of-Sequence append a row to the matrix, each
using the same address: 0x4004c6.  The Copy declares a target
instruction at that address.  The End-of-Sequence declares that the
sequence ends before that address.

It's a contradiction that the target instruction is both part of the
sequence (according to Copy) and not part of the sequence (according to
End-of-Sequence).

Can you confirm that this analysis is correct?

If so, is there a standard term to describe this problem?
Incorrect/malformed/invalid/non-conforming/non-sensical or some such?

[ FWIW, gdb handles this type of line table program by deleting the row
corresponding to the Copy.  The related comment mentions that it removes
"empty lines" from the line table.  I don't understand the use of the
term "empty line" for this. ]

Thanks,
- Tom




More information about the Dwarf-discuss mailing list