1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (c) 2020 Facebook */
3 #ifndef __BTF_HELPERS_H
4 #define __BTF_HELPERS_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
);