2 * @file fbi_probe/fbi_probe.h
4 * @author Alexander Aksenov <a.aksenov@samsung.com>
5 * @author Vitaliy Cherepanov <v.cherepanov@samsung.com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 * Copyright (C) Samsung Electronics, 2014
25 * 2014 Alexander Aksenov : FBI implement
26 * 2014 Vitaliy Cherepanov: FBI implement, portage
28 * @section DESCRIPTION
30 * Function body instrumentation.
34 #ifndef __FBI_PROBE_H__
35 #define __FBI_PROBE_H__
37 #include <linux/types.h>
41 uint8_t ptr_order; /* Specifies what is located on the address:
42 * ptr_order = 0 - variable
43 * ptr_order = 1 - pointer to variable
44 * ptr_order = 2 - pointer to pointer
52 /* Variable position is evaluated by the following rule:
53 * var_position = *(pointer_to_register) - reg_offset
54 * It is expected that the offset is not null only when we're taking
55 * var value from stack.
57 uint64_t var_id; /* Variable identifier
58 * Used to specify var */
59 uint64_t reg_offset; /* Offset relative to the registers value
60 * address, specified with reg_n */
61 uint8_t reg_n; /* Register number. Hope times of cpu
62 * with more than 2 million ones are very
64 uint32_t data_size; /* Data size to be read */
66 uint8_t steps_count; /* Count of steps to extract variable
68 struct fbi_step *steps; /* extract steps */
74 struct fbi_var_data *vars;
77 #endif /* __FBI_PROBE_H__ */