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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
You've omitted the most important information, what binutils version you are
using and what binutils gcc has been configured against, because the line table
is usually (with the exception of -gno-as-loc-support etc.) created by the
assembler with the help of the compiler, not by the compiler itself.
So, depending on what binutils has the compiler been compiled against, the
.debug_line can sometimes be just DWARF 3 or 4 instead of 5 even when other
sections (the compiler emitted ones) are DWARF 5 etc.
When using binutils 2.36.1 against which gcc has been configured I certainly
see
Raw dump of debug contents of section .debug_line:

  Offset:                      0x0
  Length:                      79
  DWARF Version:               5
...
 The Directory Table (offset 0x22, lines 2, columns 1):
  Entry Name
  0     (indirect line string, offset: 0x10): /tmp
  1     (indirect line string, offset: 0x15): out

 The File Name Table (offset 0x30, lines 2, columns 2):
  Entry Dir     Name
  0     0       (indirect line string, offset: 0x19): out/test.c
  1     1       (indirect line string, offset: 0x24): test.c
and similarly for -gno-as-loc-support on gcc configured against older binutils.

Reply via email to