Bug 25643 - Failures with target board unix/-feliminate-dwarf2-dups
Summary: Failures with target board unix/-feliminate-dwarf2-dups
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: testsuite (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-07 22:10 UTC by Tom de Vries
Modified: 2020-03-07 22:15 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom de Vries 2020-03-07 22:10:06 UTC
After recent fixes to master, we're left with these FAILs for target board unix/-feliminate-dwarf2-dups:
...
FAIL: gdb.base/maint.exp: mt expand-symtabs
FAIL: gdb.base/ptype.exp: ptype foo typedef after first list of charfoo
FAIL: gdb.base/ptype.exp: ptype foo typedef after second list of charfoo
FAIL: gdb.base/symfile-warn.exp: add-symbol-file
FAIL: gdb.guile/scm-symtab.exp: test simple_struct in static symbols
FAIL: gdb.python/py-symtab.exp: test simple_struct in static symbols
...
Comment 1 Tom de Vries 2020-03-07 22:15:32 UTC
Looking at the first failure, the debug info looks quite different.

Normally, it looks like:
...
$ readelf -wi maint > READELF
$ egrep "Compilation |DW_AT_name" READELF \
  | grep Compilation -A1 \
  | sed 's/:.*://;s%/.*/%%'
  Compilation Unit @ offset 0x0:
    <20>   DW_AT_name         ..start.S
  Compilation Unit @ offset 0x2e:
    <3f>   DW_AT_name         init.c
--
  Compilation Unit @ offset 0xa5:
    <b9>   DW_AT_name         ..crti.S
  Compilation Unit @ offset 0xc7:
    <d8>   DW_AT_name         break.c
--
  Compilation Unit @ offset 0x4fd:
    <50e>   DW_AT_name         break1.c
--
  Compilation Unit @ offset 0x6e2:
    <6f3>   DW_AT_name         elf-init.c
--
  Compilation Unit @ offset 0x89a:
    <8ae>   DW_AT_name         ..crtn.S
...

But with -feliminate-dwarf2-dups, we have:
...
$ readelf -wi maint > READELF
$ egrep "Compilation |DW_AT_name" READELF \
  | grep Compilation -A1 \
  | sed 's/:.*://;s%/.*/%%'
  Compilation Unit @ offset 0x0:
    <20>   DW_AT_name         ..start.S
  Compilation Unit @ offset 0x2e:
    <3f>   DW_AT_name         init.c
--
  Compilation Unit @ offset 0xa5:
    <b9>   DW_AT_name         ..crti.S
  Compilation Unit @ offset 0xc7:
    <d3>   DW_AT_name         stddef.h
--
  Compilation Unit @ offset 0xec:
    <f8>   DW_AT_name         types.h
--
  Compilation Unit @ offset 0x121:
    <12d>   DW_AT_name         __FILE.h
--
  Compilation Unit @ offset 0x2c3:
    <2cf>   DW_AT_name         libio.h
--
  Compilation Unit @ offset 0x356:
    <362>   DW_AT_name         sys_errlist.h
  Compilation Unit @ offset 0x380:
    <391>   DW_AT_name         break.c
--
  Compilation Unit @ offset 0x5a3:
    <5af>   DW_AT_name         break1.c
--
  Compilation Unit @ offset 0x646:
    <657>   DW_AT_name         break1.c
--
  Compilation Unit @ offset 0x7a3:
    <7b4>   DW_AT_name         elf-init.c
--
  Compilation Unit @ offset 0x95b:
    <96f>   DW_AT_name         ..crtn.S
...

It's clear that this can cause differences in number of symtabs expanded etc.