Download src/php/php-src/sapi/phpdbg/phpdbg.h from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 12.6 kB
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/sapi/phpdbg/phpdbg.h
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/sapi/phpdbg/phpdbg.h
-
curl -L -o phpdbg.h https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/sapi/phpdbg/phpdbg.h
12.6 kB
| /* | |
| +----------------------------------------------------------------------+ | |
| | Copyright (c) The PHP Group | | |
| +----------------------------------------------------------------------+ | |
| | This source file is subject to version 3.01 of the PHP license, | | |
| | that is bundled with this package in the file LICENSE, and is | | |
| | available through the world-wide-web at the following url: | | |
| | https://www.php.net/license/3_01.txt | | |
| | If you did not receive a copy of the PHP license and are unable to | | |
| | obtain it through the world-wide-web, please send a note to | | |
| | license@php.net so we can mail you a copy immediately. | | |
| +----------------------------------------------------------------------+ | |
| | Authors: Felipe Pena <felipe@php.net> | | |
| | Authors: Joe Watkins <joe.watkins@live.co.uk> | | |
| | Authors: Bob Weinand <bwoebi@php.net> | | |
| +----------------------------------------------------------------------+ | |
| */ | |
| /* {{{ strings */ | |
| /* }}} */ | |
| int phpdbg_do_parse(phpdbg_param_t *stack, char *input); | |
| /* | |
| BEGIN: DO NOT CHANGE DO NOT CHANGE DO NOT CHANGE | |
| */ | |
| /* {{{ flags */ | |
| /* | |
| END: DO NOT CHANGE DO NOT CHANGE DO NOT CHANGE | |
| */ | |
| /* {{{ output descriptors */ | |
| void phpdbg_register_file_handles(void); | |
| typedef struct _phpdbg_oplog_entry phpdbg_oplog_entry; | |
| struct _phpdbg_oplog_entry { | |
| phpdbg_oplog_entry *next; | |
| zend_string *function_name; | |
| zend_class_entry *scope; | |
| zend_string *filename; | |
| zend_op *opcodes; | |
| zend_op *op; | |
| }; | |
| typedef struct _phpdbg_oplog_list phpdbg_oplog_list; | |
| struct _phpdbg_oplog_list { | |
| phpdbg_oplog_list *prev; | |
| phpdbg_oplog_entry start; /* Only "next" member used. */ | |
| }; | |
| /* {{{ structs */ | |
| ZEND_BEGIN_MODULE_GLOBALS(phpdbg) | |
| HashTable bp[PHPDBG_BREAK_TABLES]; /* break points */ | |
| HashTable registered; /* registered */ | |
| HashTable seek; /* seek oplines */ | |
| zend_execute_data *seek_ex; /* call frame of oplines to seek to */ | |
| zend_object *handled_exception; /* last handled exception (prevent multiple handling of same exception) */ | |
| phpdbg_frame_t frame; /* frame */ | |
| uint32_t last_line; /* last executed line */ | |
| char *cur_command; /* current command */ | |
| phpdbg_lexer_data lexer; /* lexer data */ | |
| phpdbg_param_t *parser_stack; /* param stack during lexer / parser phase */ | |
| struct sigaction old_sigsegv_signal; /* segv signal handler */ | |
| int watch_userfaultfd; /* userfaultfd(2) handler, 0 if unused */ | |
| pthread_t watch_userfault_thread; /* thread for watch fault handling */ | |
| phpdbg_btree watchpoint_tree; /* tree with watchpoints */ | |
| phpdbg_btree watch_HashTables; /* tree with original dtors of watchpoints */ | |
| HashTable watch_elements; /* user defined watch elements */ | |
| HashTable watch_collisions; /* collision table to check if multiple watches share the same recursive watchpoint */ | |
| HashTable watch_recreation; /* watch elements pending recreation of their respective watchpoints */ | |
| HashTable watch_free; /* pointers to watch for being freed */ | |
| HashTable *watchlist_mem; /* triggered watchpoints */ | |
| HashTable *original_watchlist_mem; /* the original allocation for watchlist_mem, used when watchlist_mem has changed temporarily */ | |
| HashTable *watchlist_mem_backup; /* triggered watchpoints backup table while iterating over it */ | |
| bool watchpoint_hit; /* a watchpoint was hit */ | |
| void (*original_free_function)(void * ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC); /* the original AG(mm_heap)->_free function */ | |
| phpdbg_watch_element *watch_tmp; /* temporary pointer for a watch element */ | |
| char *exec; /* file to execute */ | |
| size_t exec_len; /* size of exec */ | |
| zend_op_array *ops; /* op_array */ | |
| zval retval; /* return value */ | |
| int bp_count; /* breakpoint count */ | |
| int vmret; /* return from last opcode handler execution */ | |
| bool in_execution; /* in execution? */ | |
| bool unclean_eval; /* do not check for memory leaks when we needed to bail out during eval */ | |
| zend_op_array *(*compile_file)(zend_file_handle *file_handle, int type); | |
| zend_op_array *(*init_compile_file)(zend_file_handle *file_handle, int type); | |
| zend_op_array *(*compile_string)(zend_string *source_string, const char *filename, zend_compile_position position); | |
| HashTable file_sources; | |
| zend_arena *oplog_arena; /* arena for storing oplog */ | |
| phpdbg_oplog_list *oplog_list; /* list of oplog starts */ | |
| phpdbg_oplog_entry *oplog_cur; /* current oplog entry */ | |
| struct { | |
| int fd; | |
| } io[PHPDBG_IO_FDS]; /* io */ | |
| ssize_t (*php_stdiop_write)(php_stream *, const char *, size_t); | |
| struct { | |
| bool active; | |
| int type; | |
| int fd; | |
| char *msg; | |
| int msglen; | |
| } err_buf; /* error buffer */ | |
| zend_ulong req_id; /* "request id" to keep track of commands */ | |
| char *prompt[2]; /* prompt */ | |
| const phpdbg_color_t *colors[PHPDBG_COLORS]; /* colors */ | |
| char *buffer; /* buffer */ | |
| bool last_was_newline; /* check if we don't need to output a newline upon next phpdbg_error or phpdbg_notice */ | |
| FILE *stdin_file; /* FILE pointer to stdin source file */ | |
| const php_stream_wrapper *orig_url_wrap_php; | |
| char input_buffer[PHPDBG_MAX_CMD]; /* stdin input buffer */ | |
| int input_buflen; /* length of stdin input buffer */ | |
| phpdbg_signal_safe_mem sigsafe_mem; /* memory to use in async safe environment (only once!) */ | |
| JMP_BUF *sigsegv_bailout; /* bailout address for accessibility probing */ | |
| uint64_t flags; /* phpdbg flags */ | |
| char *sapi_name_ptr; /* store sapi name to free it if necessary to not leak memory */ | |
| zend_ulong lines; /* max number of lines to display */ | |
| ZEND_END_MODULE_GLOBALS(phpdbg) /* }}} */ | |