mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-06 12:09:26 +08:00
2ba5ec13b2
The intent of the name lookup code was for lookups to yield non-bitfield basic types except if none existed with a given name, and only then return bitfield types with that name. Unfortunately, the code as written only does this if the base type has a type ID higher than all bitfield types, which is most unlikely (the opposite is almost always the case). Adjust it so that what ends up in the name table is the highest-width zero-offset type with a given name, if any such exist, and failing that the first type with that name we see, no matter its offset. (We don't define *which* bitfield type you get, after all, so we might as well just stuff in the first we find.) Reported by Stephen Brennan <stephen.brennan@oracle.com>. libctf/ * ctf-open.c (init_types): Modify to allow some lookups during open; detect bitfield name reuse and prefer less bitfieldy types. * testsuite/libctf-writable/libctf-bitfield-name-lookup.*: New test. |
||
---|---|---|
.. | ||
error-propagation.c | ||
error-propagation.lk | ||
libctf-bitfield-name-lookup.c | ||
libctf-bitfield-name-lookup.lk | ||
libctf-errors.c | ||
libctf-errors.lk | ||
parent-child-dtd-crash-lib.c | ||
parent-child-dtd-enum.c | ||
parent-child-dtd-enum.lk | ||
parent-child-dtd-enumerator.c | ||
parent-child-dtd-enumerator.lk | ||
parent-child-dtd-member-encoded.c | ||
parent-child-dtd-member-encoded.lk | ||
parent-child-dtd-member-offset.c | ||
parent-child-dtd-member-offset.lk | ||
parent-child-dtd-set-array.c | ||
parent-child-dtd-set-array.lk | ||
parent-child-dtd-struct.c | ||
parent-child-dtd-struct.lk | ||
parent-child-dtd-union.c | ||
parent-child-dtd-union.lk | ||
pptrtab-writable-page-deep-lookup.c | ||
pptrtab-writable-page-deep-lookup.lk | ||
pptrtab.c | ||
pptrtab.lk | ||
reserialize-strtab-corruption.c | ||
reserialize-strtab-corruption.lk | ||
symtypetab-nonlinker-writeout.c | ||
symtypetab-nonlinker-writeout.lk | ||
writable.exp |