libctf: Add iteration over non-root types
authorNick Alcock <nick.alcock@oracle.com>
Sat, 13 Jul 2019 19:00:07 +0000 (20:00 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Thu, 3 Oct 2019 16:04:55 +0000 (17:04 +0100)
commit0ac6231298cbc5a3a16bd4e98d85d98700b81dee
tree89040caa55c0d64d462235ef2ba45cc50b84b74d
parent6b88d7d70c50fc320cd693fb3ddba6e28da839aa
libctf: Add iteration over non-root types

The existing function ctf_type_iter lets you iterate over root-visible
types (types you can look up by name).  There is no way to iterate over
non-root-visible types, which is troublesome because both the linker
and dumper want to do that.

So add a new function that can do it: the callback it takes accepts
an extra parameter which indicates whether the type is root-visible
or not.

include/
* ctf-api.h (ctf_type_all_f): New.
(ctf_type_iter_all): New.

libctf/
* ctf_types.c (ctf_type_iter_all): New.
include/ChangeLog
include/ctf-api.h
libctf/ChangeLog
libctf/ctf-types.c