1/**
2 * @file op_abi.h
3 * This file contains a simple C interface to the ABI-describing functionality,
4 * the majority of which is implemented in C++. this is the file which is
5 * intended for use in files outside the /libabi directory.
6 *
7 * @remark Copyright 2002 OProfile authors
8 * @remark Read the file COPYING
9 *
10 * @author Graydon Hoare
11 * @author Philippe Elie
12 */
13
14#ifndef OP_ABI_H
15#define OP_ABI_H
16
17struct op_abi_entry {
18	char const * name;
19	/// offset or size of the named entry
20	int offset;
21};
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/// return array is terminated by a NULL entry in name field
28struct op_abi_entry const * get_abi(void);
29
30/// return non zero if the abi is little endian
31int op_little_endian(void);
32
33/**
34 * Write current abi to file.
35 * return 1 on success, 0 on failure
36 */
37int op_write_abi_to_file(char const * abi_file);
38
39#ifdef __cplusplus
40}
41#endif
42
43#endif // OP_ABI_H
44