/
code_coverage_private.h
63 lines (49 loc) · 2.35 KB
/
code_coverage_private.h
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
+----------------------------------------------------------------------+
| Xdebug |
+----------------------------------------------------------------------+
| Copyright (c) 2002-2019 Derick Rethans |
+----------------------------------------------------------------------+
| This source file is subject to version 1.01 of the Xdebug license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| https://xdebug.org/license.php |
| If you did not receive a copy of the Xdebug license and are unable |
| to obtain it through the world-wide-web, please send a note to |
| derick@xdebug.org so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Derick Rethans <derick@xdebug.org> |
+----------------------------------------------------------------------+
*/
#ifndef __XDEBUG_CODE_COVERAGE_PRIVATE_H__
#define __XDEBUG_CODE_COVERAGE_PRIVATE_H__
#include "php.h"
#include "branch_info.h"
#include "code_coverage.h"
#include "lib/private.h"
#include "lib/compat.h"
#include "lib/hash.h"
#include "lib/mm.h"
typedef struct xdebug_coverage_line {
int lineno;
int count;
int executable;
} xdebug_coverage_line;
typedef struct xdebug_coverage_function {
char *name;
xdebug_branch_info *branch_info;
} xdebug_coverage_function;
#define XG_COV(v) (XG(globals.coverage.v))
#define XINI_COV(v) (XG(settings.coverage.v))
xdebug_coverage_file *xdebug_coverage_file_ctor(char *filename);
xdebug_coverage_function *xdebug_coverage_function_ctor(char *function_name);
void xdebug_coverage_function_dtor(void *data);
void xdebug_code_coverage_start_of_function(zend_op_array *op_array, char *function_name);
void xdebug_code_coverage_end_of_function(zend_op_array *op_array, char *file_name, char *function_name);
int xdebug_common_override_handler(zend_execute_data *execute_data);
PHP_FUNCTION(xdebug_start_code_coverage);
PHP_FUNCTION(xdebug_stop_code_coverage);
PHP_FUNCTION(xdebug_get_code_coverage);
PHP_FUNCTION(xdebug_code_coverage_started);
PHP_FUNCTION(xdebug_get_function_count);
#endif