Check OBJF_NOT_FILENAME in DWARF index code
authorTom Tromey <tom@tromey.com>
Tue, 26 Apr 2022 18:45:07 +0000 (12:45 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 28 Apr 2022 15:37:48 +0000 (09:37 -0600)
commit9dd9f9ce1e231ef594845f11c05a724653241b58
tree6748568e879ce123e0bcd2736d724b2b2771ce56
parent0d1703b8fb611f978577a70ad6aa308a12a53980
Check OBJF_NOT_FILENAME in DWARF index code

The DWARF index code currently uses 'stat' to see if an objfile
represents a real file.  However, I think it's more correct to check
OBJF_NOT_FILENAME instead.

Regression tested on x86-64 Fedora 34.
gdb/dwarf2/index-cache.c
gdb/dwarf2/index-write.c