Upstream | cc2ee17 | 1970-01-12 13:46:40 +0000 | [diff] [blame] | 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 |
The Android Open Source Project | 7984f7a | 2008-12-17 18:04:47 -0800 | [diff] [blame] | 11 | * @author Philippe Elie |
Upstream | cc2ee17 | 1970-01-12 13:46:40 +0000 | [diff] [blame] | 12 | */ |
| 13 | |
| 14 | #ifndef OP_ABI_H |
| 15 | #define OP_ABI_H |
| 16 | |
The Android Open Source Project | 7984f7a | 2008-12-17 18:04:47 -0800 | [diff] [blame] | 17 | struct op_abi_entry { |
| 18 | char const * name; |
| 19 | /// offset or size of the named entry |
| 20 | int offset; |
| 21 | }; |
| 22 | |
Upstream | cc2ee17 | 1970-01-12 13:46:40 +0000 | [diff] [blame] | 23 | #ifdef __cplusplus |
| 24 | extern "C" { |
| 25 | #endif |
| 26 | |
The Android Open Source Project | 7984f7a | 2008-12-17 18:04:47 -0800 | [diff] [blame] | 27 | /// return array is terminated by a NULL entry in name field |
| 28 | struct op_abi_entry const * get_abi(void); |
| 29 | |
| 30 | /// return non zero if the abi is little endian |
| 31 | int op_little_endian(void); |
| 32 | |
Upstream | cc2ee17 | 1970-01-12 13:46:40 +0000 | [diff] [blame] | 33 | /** |
| 34 | * Write current abi to file. |
| 35 | * return 1 on success, 0 on failure |
| 36 | */ |
| 37 | int op_write_abi_to_file(char const * abi_file); |
| 38 | |
| 39 | #ifdef __cplusplus |
| 40 | } |
| 41 | #endif |
| 42 | |
| 43 | #endif // OP_ABI_H |