WIP FPC-III support
[linux/fpc-iii.git] / tools / testing / selftests / bpf / btf_helpers.h
blob295c0137d9bdca1e69877e5ec42a245f6d1ee929
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (c) 2020 Facebook */
3 #ifndef __BTF_HELPERS_H
4 #define __BTF_HELPERS_H
6 #include <stdio.h>
7 #include <bpf/btf.h>
9 int fprintf_btf_type_raw(FILE *out, const struct btf *btf, __u32 id);
10 const char *btf_type_raw_dump(const struct btf *btf, int type_id);
11 int btf_validate_raw(struct btf *btf, int nr_types, const char *exp_types[]);
13 #define VALIDATE_RAW_BTF(btf, raw_types...) \
14 btf_validate_raw(btf, \
15 sizeof((const char *[]){raw_types})/sizeof(void *),\
16 (const char *[]){raw_types})
18 const char *btf_type_c_dump(const struct btf *btf);
19 #endif