xref: /PHP-8.2/sapi/phpdbg/phpdbg_list.h (revision b8f10dec)
1 /*
2    +----------------------------------------------------------------------+
3    | Copyright (c) The PHP Group                                          |
4    +----------------------------------------------------------------------+
5    | This source file is subject to version 3.01 of the PHP license,      |
6    | that is bundled with this package in the file LICENSE, and is        |
7    | available through the world-wide-web at the following url:           |
8    | https://www.php.net/license/3_01.txt                                 |
9    | If you did not receive a copy of the PHP license and are unable to   |
10    | obtain it through the world-wide-web, please send a note to          |
11    | license@php.net so we can mail you a copy immediately.               |
12    +----------------------------------------------------------------------+
13    | Authors: Felipe Pena <felipe@php.net>                                |
14    | Authors: Joe Watkins <joe.watkins@live.co.uk>                        |
15    | Authors: Bob Weinand <bwoebi@php.net>                                |
16    +----------------------------------------------------------------------+
17 */
18 
19 #ifndef PHPDBG_LIST_H
20 #define PHPDBG_LIST_H
21 
22 #include "TSRM.h"
23 #include "phpdbg_cmd.h"
24 
25 #define PHPDBG_LIST(name)         PHPDBG_COMMAND(list_##name)
26 #define PHPDBG_LIST_HANDLER(name) PHPDBG_COMMAND_HANDLER(list_##name)
27 
28 PHPDBG_LIST(lines);
29 PHPDBG_LIST(class);
30 PHPDBG_LIST(method);
31 PHPDBG_LIST(func);
32 
33 void phpdbg_list_function_byname(const char *, size_t);
34 void phpdbg_list_function(const zend_function *);
35 void phpdbg_list_file(zend_string *, uint32_t, int, uint32_t);
36 
37 extern const phpdbg_command_t phpdbg_list_commands[];
38 
39 void phpdbg_init_list(void);
40 void phpdbg_list_update(void);
41 
42 typedef struct {
43 	char *buf;
44 	size_t len;
45 	zend_op_array op_array;
46 	uint32_t lines;
47 	uint32_t line[1];
48 } phpdbg_file_source;
49 
50 #endif /* PHPDBG_LIST_H */
51