diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2020-06-02 21:11:25 +0100 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2020-07-22 17:57:38 +0100 |
commit | e0325e2cede6f9da2560ede6d4a17d9e21fbea9c (patch) | |
tree | 387753f6792402171ec8f95b157859bb94c734ee /include | |
parent | 9b15cbb7891f6b8b185fed41e5e6ecea0a6a6c36 (diff) | |
download | gdb-e0325e2cede6f9da2560ede6d4a17d9e21fbea9c.zip gdb-e0325e2cede6f9da2560ede6d4a17d9e21fbea9c.tar.gz gdb-e0325e2cede6f9da2560ede6d4a17d9e21fbea9c.tar.bz2 |
libctf: add ctf_member_count
This returns the number of members in a struct or union, or the number
of enumerations in an enum. (This was only available before now by
iterating across every member, but it can be returned much faster than
that.)
include/
* ctf-api.h (ctf_member_count): New.
libctf/
* ctf-types.c (ctf_member_count): New.
* libctf.ver: New public function.
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 4 | ||||
-rw-r--r-- | include/ctf-api.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index 18b0b0b..27ffb90 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,5 +1,9 @@ 2020-07-22 Nick Alcock <nick.alcock@oracle.com> + * ctf-api.h (ctf_member_count): New. + +2020-07-22 Nick Alcock <nick.alcock@oracle.com> + * ctf-api.h (ctf_type_kind_forwarded): New. 2020-07-22 Nick Alcock <nick.alcock@oracle.com> diff --git a/include/ctf-api.h b/include/ctf-api.h index 87446a5..7cdf4a5 100644 --- a/include/ctf-api.h +++ b/include/ctf-api.h @@ -349,6 +349,7 @@ extern const char *ctf_label_get (ctf_file_t *); extern const char *ctf_label_topmost (ctf_file_t *); extern int ctf_label_info (ctf_file_t *, const char *, ctf_lblinfo_t *); +extern int ctf_member_count (ctf_file_t *, ctf_id_t); extern int ctf_member_iter (ctf_file_t *, ctf_id_t, ctf_member_f *, void *); extern int ctf_enum_iter (ctf_file_t *, ctf_id_t, ctf_enum_f *, void *); extern int ctf_type_iter (ctf_file_t *, ctf_type_f *, void *); |