]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
libctf, types: ctf_type_kind_{iter,next} et al
authorNick Alcock <nick.alcock@oracle.com>
Thu, 24 Apr 2025 17:00:32 +0000 (18:00 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Fri, 25 Apr 2025 17:07:43 +0000 (18:07 +0100)
commita632f3ed33636101e0cef0485abe52255841b5c7
treed0878f6a8b14b8c9455382f64c075bc17b9cb053
parentea21a1b2ae4987d81b876e47ba784c347a84e21f
libctf, types: ctf_type_kind_{iter,next} et al

These new functions let you iterate over types by kind, letting you get all
variables, all enums, all datasecs, etc.  (This is amenable to future
optimization, and some is expected shortly.)

We also add new iternal functions ctf_type_kind_{forwarded_,unsliced_,}tp
which are like the corresponding non-_tp functions except that they
take a ctf_type_t rather than a type ID: doing this allows the deduplicator
to use these nearly-public functions more.  The public ctf_type_kind*
functions are reimplemented in terms of these.

This machinery is the principal place where the magic encoding of forwards
is encoded.
include/ctf-api.h
libctf/ctf-impl.h
libctf/ctf-types.c
libctf/libctf.ver