mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-12 12:16:04 +08:00
502e838ed9
It is perfectly valid C to say e.g. typedef u64 int; struct foo_t { const volatile u64 wibble:2; }; i.e. bitfields have to be integral types, but they can be cv-qualified integral types or typedefs of same, etc. This is easy to fix: do a ctf_type_resolve_unsliced() at creation time to ensure the ultimate type is integral, and ctf_type_resolve() at lookup time so that if you somehow have e.g. a slice of a typedef of a slice of a cv-qualified int, we pull the encoding that the topmost slice is based on out of the subsidiary slice (and then modify it), not out of the underlying int. (This last bit is rather academic right now, since all slices override exactly the same properties of the underlying type, but it's still the right thing to do.) libctf/ * ctf-create.c (ctf_add_slice): Support slices of any kind that resolves to an integral type. * ctf-types.c (ctf_type_encoding): Resolve the type before fishing its encoding out. |
||
---|---|---|
.. | ||
.gitignore | ||
aclocal.m4 | ||
ChangeLog | ||
config.h.in | ||
configure | ||
configure.ac | ||
ctf-archive.c | ||
ctf-create.c | ||
ctf-decl.c | ||
ctf-decls.h | ||
ctf-dump.c | ||
ctf-endian.h | ||
ctf-error.c | ||
ctf-hash.c | ||
ctf-impl.h | ||
ctf-labels.c | ||
ctf-link.c | ||
ctf-lookup.c | ||
ctf-open-bfd.c | ||
ctf-open.c | ||
ctf-qsort_r.c | ||
ctf-string.c | ||
ctf-subr.c | ||
ctf-types.c | ||
ctf-util.c | ||
elf.h | ||
libctf.ver | ||
Makefile.am | ||
Makefile.in | ||
mkerrors.sed | ||
swap.h |