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 ...
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.