aboutsummaryrefslogtreecommitdiff
path: root/gcc/ctfc.h
diff options
context:
space:
mode:
authorCupertino Miranda <cupertino.miranda@oracle.com>2024-02-12 17:36:21 +0000
committerCupertino Miranda <cupertino.miranda@oracle.com>2024-02-28 19:20:20 +0000
commit69a3ce49bda929e1ffbc1fc1123f5f2485ec944d (patch)
tree05da6f2f49755ab20b5414c5386155393eef446f /gcc/ctfc.h
parent0198cade5ac15c35ed3f5af54060d7bc6a39f326 (diff)
downloadgcc-69a3ce49bda929e1ffbc1fc1123f5f2485ec944d.zip
gcc-69a3ce49bda929e1ffbc1fc1123f5f2485ec944d.tar.gz
gcc-69a3ce49bda929e1ffbc1fc1123f5f2485ec944d.tar.bz2
btf: add BTF_KIND_FUNC traversal function.
The patch adds a traversal function to traverse all BTF_KIND_FUNC nodes with a callback function. Used for .BTF.ext section content creation. gcc/ChangeLog: * btfout.cc (output_btf_func_types): Use FOR_EACH_VEC_ELT. (traverse_btf_func_types): Define function. * ctfc.h (funcs_traverse_callback): Typedef for function prototype. (traverse_btf_func_types): Add prototype.
Diffstat (limited to 'gcc/ctfc.h')
-rw-r--r--gcc/ctfc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/ctfc.h b/gcc/ctfc.h
index 7aac57e..fa188bf 100644
--- a/gcc/ctfc.h
+++ b/gcc/ctfc.h
@@ -441,6 +441,9 @@ extern int ctf_add_variable (ctf_container_ref, const char *, ctf_id_t,
extern ctf_id_t ctf_lookup_tree_type (ctf_container_ref, const tree);
extern ctf_id_t get_btf_id (ctf_id_t);
+typedef bool (*funcs_traverse_callback) (ctf_dtdef_ref, void *);
+bool traverse_btf_func_types (funcs_traverse_callback, void *);
+
/* CTF section does not emit location information; at this time, location
information is needed for BTF CO-RE use-cases. */