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

[Bug default/24341] New: multifile .debug_info section not present



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

            Bug ID: 24341
           Summary: multifile .debug_info section not present
           Product: dwz
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: default
          Assignee: nobody at sourceware dot org
          Reporter: vries at gcc dot gnu.org
                CC: dwz at sourceware dot org
  Target Milestone: ---

Consider a minimal executable test-case 1:
...
$ cat min.c
int
main (void)
{
  return 0;
}
$ gcc -g min.c -o 1
...

When self-multifile-dwz-ing, we get:
...
$ cp 1 2
$ dwz -m 3 1 2
dwz: 3: .debug_info section not present
$ echo $?
1
$ readelf -S 1 2 | grep -c "\.gnu_debugaltlink"
0
...

It's correct that the .debug_info section is missing, there's only a .debug_str
debug section:
...
$ readelf -S 3 | grep \]
  [Nr] Name              Type             Address           Offset
  [ 0]                   NULL             0000000000000000  00000000
  [ 1] .note.gnu.build-i NOTE             0000000000000000  00000040
  [ 2] .debug_str        PROGBITS         0000000000000000  00000064
  [ 3] .shstrtab         STRTAB           0000000000000000  000001d0
...

The .debug_info section in the original file is only one compilation unit big:
...
$ readelf -w 1 | grep '(DW_TAG_compile_unit)'
 <0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
...
and dwz just happens not to find anything in the .debug_info to optimize
against in multifile mode.

I only managed to reproduce this on my ubuntu 16.04 laptop, on openSUSE leap
15.0 I get more compilation units and can't reproduce the error message.

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