public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/95574] New: line table entry in sequence with address after sequence
@ 2020-06-08  9:18 vries at gcc dot gnu.org
  2020-06-08  9:27 ` [Bug debug/95574] " vries at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2020-06-08  9:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95574

            Bug ID: 95574
           Summary: line table entry in sequence with address after
                    sequence
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

When doing a build from current trunk, I get the following in the .debug_line
section of build/x86_64-pc-linux-gnu/libgcc/libgcc_s.so.1:
...
  [0x000006f5]  Special opcode 75: advance Address by 5 to 0x2faa and Line by 0
to 246
  [0x000006f6]  Advance PC by 0 to 0x2faa
  [0x000006f8]  Extended opcode 1: End of Sequence
...

This is nonsensical dwarf: both the special opcode and the End-Of-Sequence
declare a row in the matrix, each with the same address.

The special opcode 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).

[ Relevant dwarf standard bits:

end_sequence:

A boolean indicating that the current address is that of the first byte
after the end of a sequence of target machine instructions. end_sequence
terminates a sequence of lines; therefore other information in the same
row is not meaningful.

Special Opcodes

Each ubyte special opcode has the following effect on the state machine:
1. Add a signed integer to the line register.
2. Modify the operation pointer by incrementing the address and op_index
registers as described below.
3. Append a row to the matrix using the current values of the state machine
registers.

DW_LNE_end_sequence:

The DW_LNE_end_sequence opcode takes no operands. It sets the
end_sequence register of the state machine to “true” and appends a row
to the matrix using the current values of the state-machine registers.
Then it resets the registers to the initial values specified above (see
Section 6.2.2). Every line number program sequence must end with a
DW_LNE_end_sequence instruction which creates a row whose address is
that of the byte after the last target machine instruction of the sequence.

]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-07-07 14:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-08  9:18 [Bug debug/95574] New: line table entry in sequence with address after sequence vries at gcc dot gnu.org
2020-06-08  9:27 ` [Bug debug/95574] " vries at gcc dot gnu.org
2020-06-08  9:35 ` vries at gcc dot gnu.org
2020-06-08  9:36 ` vries at gcc dot gnu.org
2020-07-07 13:40 ` vries at gcc dot gnu.org
2020-07-07 13:44 ` vries at gcc dot gnu.org
2020-07-07 14:03 ` vries at gcc dot gnu.org
2020-07-07 14:13 ` vries at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).