]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
libctf: types: recursive type visiting
authorNick Alcock <nick.alcock@oracle.com>
Fri, 25 Apr 2025 10:44:19 +0000 (11:44 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Fri, 25 Apr 2025 17:07:43 +0000 (18:07 +0100)
commit33326f571fbf4943d5d55994705904e07cad1931
treeacdedbdd3d87002bb83c5fdc07c24d2eb516d8e1
parent1ece8c93c03eb38f4658d202817e3f7e3fc81e6a
libctf: types: recursive type visiting

ctf_type_visit and ctf_type_rvisit have to adapt to the internal
API changes, but also to the change in the representation of
structures.  The new code is quite a lot simpler than the old,
because we don't need to roll our own iterator but can just use
ctf_member_next.

API changes, the usual for the *_f typedefs and anything to do with
structures:

-typedef int ctf_visit_f (const char *name, ctf_id_t type, unsigned long offset,
-  int depth, void *arg);
+typedef int ctf_visit_f (ctf_dict_t *, const char *name, ctf_id_t type,
+  size_t offset, int bit_width, int depth,
   void *arg);
include/ctf-api.h
libctf/ctf-types.c