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

            Bug ID: 93220
           Summary: DWARF line info file name table "incomplete"
           Product: gcc
           Version: 9.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

For

> cat t.h
1, 2, 3,
4, 5, 6
> cat t.c
int a[] = {
#include "t.h"
};
> gcc -c t.c -g

the DWARF line info doesn't mention t.h at all (somewhat understandably
since no DWARF entity or attribute refers to it).  It has been requested
to include it nevertheless to make tools (rpm find-debuginfo) "find"
t.h when building debug sources.  With .debug_line built from .loc
directives that's of course a bit more painful.

I'll also note that even for

> cat t.c
int main()
{
int a[] = {
#include "t.h"
};
}

t.h isn't mentioned because the instructions initializing a[] do not refer
to the initializer either.

Not sure if this is a non-bug of course (I suggested so to the reporter).

Reply via email to