bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/31979] New: DW_LNE_set_discriminator emitted right before Speci


From: blarsen at redhat dot com
Subject: [Bug gas/31979] New: DW_LNE_set_discriminator emitted right before Special Opcodes
Date: Tue, 16 Jul 2024 13:54:12 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=31979

            Bug ID: 31979
           Summary: DW_LNE_set_discriminator emitted right before Special
                    Opcodes
           Product: binutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gas
          Assignee: unassigned at sourceware dot org
          Reporter: blarsen at redhat dot com
  Target Milestone: ---

Created attachment 15627
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15627&action=edit
small cpp code that reproduces the issue

When creating the linetable for the attached cpp file with the command line
`gcc -fPIC -Og -g`, gas generates the following instructions for the last entry
related to line 11:

  [0x00000062]  Set column to 18
  [0x00000064]  Extended opcode 4: set Discriminator to 1
  [0x00000068]  Special opcode 13: advance Address by 0 to 0x401133 and Line by
8 to 11 (view 4)

Setting the discriminator here is futile, since the DWARF 5 section 6.2.5.1
says that Special opcodes will always set the Discriminator to 0 and
immediately do a Copy, so the information is lost.

In cases where Discriminator is set, Gas shouldn't emit special opcodes.

There is another case with this exact pattern happening, for line 14.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]