binutils-gdb/libctf
Nick Alcock 502e838ed9 libctf, types: support slices of anything terminating in an int
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.
2020-07-22 17:57:31 +01:00
..
.gitignore libctf: restructure error handling to reduce relocations 2020-07-22 17:57:20 +01:00
aclocal.m4 libctf: support platforms with separate libintl 2020-06-26 15:56:39 +01:00
ChangeLog libctf, types: support slices of anything terminating in an int 2020-07-22 17:57:31 +01:00
config.h.in libctf: support platforms with separate libintl 2020-06-26 15:56:39 +01:00
configure libctf: support platforms with separate libintl 2020-06-26 15:56:39 +01:00
configure.ac libctf: support platforms with separate libintl 2020-06-26 15:56:39 +01:00
ctf-archive.c Fix problems in CTF handling code exposed by the Coverity static analysis tool. 2020-07-22 16:07:48 +01:00
ctf-create.c libctf, types: support slices of anything terminating in an int 2020-07-22 17:57:31 +01:00
ctf-decl.c Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ctf-decls.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ctf-dump.c Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ctf-endian.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ctf-error.c libctf: restructure error handling to reduce relocations 2020-07-22 17:57:20 +01:00
ctf-hash.c Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ctf-impl.h libctf, create: do not corrupt function types' arglists at insertion time 2020-07-22 17:57:22 +01:00
ctf-labels.c Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ctf-link.c Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ctf-lookup.c Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ctf-open-bfd.c libctf: add some missing #includes. 2020-06-26 15:56:39 +01:00
ctf-open.c libctf, open: drop unnecessary historical wart around forwards 2020-07-22 17:57:26 +01:00
ctf-qsort_r.c Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ctf-string.c Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ctf-subr.c Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ctf-types.c libctf, types: support slices of anything terminating in an int 2020-07-22 17:57:31 +01:00
ctf-util.c Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
elf.h Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
libctf.ver libctf, binutils: support CTF archives like objdump 2020-06-26 15:56:39 +01:00
Makefile.am libctf: restructure error handling to reduce relocations 2020-07-22 17:57:20 +01:00
Makefile.in libctf: restructure error handling to reduce relocations 2020-07-22 17:57:20 +01:00
mkerrors.sed libctf: restructure error handling to reduce relocations 2020-07-22 17:57:20 +01:00
swap.h libctf, elfcpp, gold: do not assume that <byteswap.h> contains bswap_* 2020-06-26 15:56:39 +01:00