forked from acmel/dwarves
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpahole_strings.h
More file actions
33 lines (23 loc) · 775 Bytes
/
pahole_strings.h
File metadata and controls
33 lines (23 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef _STRINGS_H_
#define _STRINGS_H_ 1
/*
SPDX-License-Identifier: GPL-2.0-only
Copyright (C) 2008 Arnaldo Carvalho de Melo <acme@redhat.com>
*/
#include <bpf/btf.h>
typedef unsigned int strings_t;
struct strings {
struct btf *btf;
};
extern const char *kabi_prefix;
struct strings *strings__new(void);
void strings__delete(struct strings *strings);
strings_t strings__add(struct strings *strings, const char *str);
strings_t strings__find(struct strings *strings, const char *str);
strings_t strings__size(const struct strings *strings);
int strings__copy(const struct strings *strings, void *dst);
static inline const char *strings__ptr(const struct strings *strings, strings_t s)
{
return btf__str_by_offset(strings->btf, s);
}
#endif /* _STRINGS_H_ */