forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -811,6 +811,9 @@ extern char *ctf_str_append_noerr (char *, const char *);
|
||||
extern ctf_id_t ctf_type_resolve_unsliced (ctf_dict_t *, ctf_id_t);
|
||||
extern ctf_id_t ctf_type_resolve_nonrepresentable (ctf_dict_t *, ctf_id_t, int allow_zero);
|
||||
extern int ctf_type_kind_unsliced (ctf_dict_t *, ctf_id_t);
|
||||
extern int ctf_type_kind_unsliced_tp (ctf_dict_t *, const ctf_type_t *);
|
||||
extern int ctf_type_kind_tp (ctf_dict_t *, const ctf_type_t *);
|
||||
extern int ctf_type_kind_forwarded_tp (ctf_dict_t *, const ctf_type_t *);
|
||||
extern ssize_t ctf_type_align_natural (ctf_dict_t *fp, ctf_id_t prev_type,
|
||||
ctf_id_t type, ssize_t bit_offset);
|
||||
extern ctf_var_secinfo_t *ctf_datasec_entry (ctf_dict_t *, ctf_id_t,
|
||||
|
||||
Reference in New Issue
Block a user