public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/98796] New: Incorrect .debug_line emitted for DWARF5
@ 2021-01-22 14:19 jakub at gcc dot gnu.org
  2021-01-22 14:19 ` [Bug debug/98796] " jakub at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-01-22 14:19 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98796
           Summary: Incorrect .debug_line emitted for DWARF5
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
  Target Milestone: ---

GCC emits incorrect DWARF5 on empty translation units.
> empty.c
gcc -S -gdwarf-5 -dA empty.c -o empty.s -gno-as-loc-support
or
gcc -S -gdwarf-5 -dA empty.c -o empty.s -flto -ffat-lto-objects
emits

        .byte   0       # Directory entry format count
        .uleb128 0      # Directories count
        .byte   0       # File name entry format count
        .uleb128 0      # File names count
at the end of .debug_line or .gnu.debuglto_.debug_line sections.
The DWARF5 specification says:
"The first entry is the current directory of the compilation."
and
"The first entry in the sequence is the primary source file whose file name
exactly matches that given in the DW_AT_name attribute in the compilation unit
debugging information entry."
which is not honored when no directory and file name entries are provided.

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

end of thread, other threads:[~2021-01-22 21:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22 14:19 [Bug debug/98796] New: Incorrect .debug_line emitted for DWARF5 jakub at gcc dot gnu.org
2021-01-22 14:19 ` [Bug debug/98796] " jakub at gcc dot gnu.org
2021-01-22 14:39 ` jakub at gcc dot gnu.org
2021-01-22 21:38 ` cvs-commit at gcc dot gnu.org
2021-01-22 21:40 ` jakub 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).