/PHP-7.2/sapi/phpdbg/ |
H A D | phpdbg_prompt.c | 390 if (PHPDBG_G(ops)) { in phpdbg_clean() 392 efree(PHPDBG_G(ops)); in phpdbg_clean() 393 PHPDBG_G(ops) = NULL; in phpdbg_clean() 484 memmove(PHPDBG_G(input_buffer), ++buf, --PHPDBG_G(input_buflen)); in PHPDBG_COMMAND() 496 memmove(PHPDBG_G(input_buffer), nl, PHPDBG_G(input_buflen)); in PHPDBG_COMMAND() 505 …tes = phpdbg_mixed_read(PHPDBG_G(io)[PHPDBG_STDIN].fd, PHPDBG_G(input_buffer) + PHPDBG_G(input_buf… in PHPDBG_COMMAND() 536 if (PHPDBG_G(exec)) { in phpdbg_compile_stdin() 608 zend_hash_del(&PHPDBG_G(file_sources), PHPDBG_G(ops)->filename); in phpdbg_compile() 808 if (PHPDBG_G(ops) || PHPDBG_G(exec)) { in PHPDBG_COMMAND() 942 zend_execute(PHPDBG_G(ops), &PHPDBG_G(retval)); in PHPDBG_COMMAND() [all …]
|
H A D | phpdbg.c | 257 if (PHPDBG_G(exec)) { in PHP_MSHUTDOWN_FUNCTION() 262 if (PHPDBG_G(oplog)) { in PHP_MSHUTDOWN_FUNCTION() 267 if (PHPDBG_G(ops)) { in PHP_MSHUTDOWN_FUNCTION() 269 efree(PHPDBG_G(ops)); in PHP_MSHUTDOWN_FUNCTION() 270 PHPDBG_G(ops) = NULL; in PHP_MSHUTDOWN_FUNCTION() 333 ZVAL_STRINGL(return_value, PHPDBG_G(exec), PHPDBG_G(exec_len)); in PHP_FUNCTION() 483 PHPDBG_G(oplog_list)->start = PHPDBG_G(oplog_cur); in PHP_FUNCTION() 922 if (PHPDBG_G(exec)) { in php_sapi_phpdbg_register_vars() 1779 PHPDBG_G(exec_len) = PHPDBG_G(exec) ? strlen(PHPDBG_G(exec)) : 0; in main() 2102 …phpdbg_file_source *data = zend_hash_str_find_ptr(&PHPDBG_G(file_sources), PHPDBG_G(exec), PHPDBG_… in main() [all …]
|
H A D | phpdbg_sigio_win32.c | 73 PHPDBG_G(swd).fd = PHPDBG_G(io)[PHPDBG_STDIN].fd; in sigio_watcher_start() 75 PHPDBG_G(swd).flags = &PHPDBG_G(flags); in sigio_watcher_start() 78 PHPDBG_G(sigio_watcher_thread) = CreateThread( in sigio_watcher_start() 82 &PHPDBG_G(swd), in sigio_watcher_start() 92 if (INVALID_HANDLE_VALUE == PHPDBG_G(sigio_watcher_thread)) { in sigio_watcher_stop() 97 waited = WaitForSingleObject(PHPDBG_G(sigio_watcher_thread), 300); in sigio_watcher_stop() 100 if (!CancelSynchronousIo(PHPDBG_G(sigio_watcher_thread))) { in sigio_watcher_stop() 104 if (!TerminateThread(PHPDBG_G(sigio_watcher_thread), 0)) { in sigio_watcher_stop() 109 PHPDBG_G(swd).fd = -1; in sigio_watcher_stop() 110 PHPDBG_G(sigio_watcher_thread) = INVALID_HANDLE_VALUE; in sigio_watcher_stop()
|
H A D | phpdbg_set.c | 87 PHPDBG_G(lines) = param->num; in PHPDBG_SET() 157 if (PHPDBG_G(prompt)[1]) { in PHPDBG_SET() 158 free(PHPDBG_G(prompt)[1]); in PHPDBG_SET() 159 PHPDBG_G(prompt)[1]=NULL; in PHPDBG_SET() 188 PHPDBG_G(flags) |= PHPDBG_IS_COLOURED; in PHPDBG_SET() 209 FILE *old = PHPDBG_G(oplog); in PHPDBG_SET() 212 if (!PHPDBG_G(oplog)) { in PHPDBG_SET() 214 PHPDBG_G(oplog) = old; in PHPDBG_SET() 238 PHPDBG_G(flags) |= PHPDBG_IS_QUIET; in PHPDBG_SET() 240 PHPDBG_G(flags) &= ~PHPDBG_IS_QUIET; in PHPDBG_SET() [all …]
|
H A D | phpdbg_sigsafe.c | 11 if (EXPECTED(size <= PHPDBG_SIGSAFE_MEM_SIZE && !PHPDBG_G(sigsafe_mem).allocated)) { in ZEND_EXTERN_MODULE_GLOBALS() 12 PHPDBG_G(sigsafe_mem).allocated = 1; in ZEND_EXTERN_MODULE_GLOBALS() 13 return (void *) (((size_t) PHPDBG_G(sigsafe_mem).mem & ~(alignment - 1)) + alignment); in ZEND_EXTERN_MODULE_GLOBALS() 16 …zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("Tried to allocate more than " EXP_STR(… in ZEND_EXTERN_MODULE_GLOBALS() 22 …zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("Bailed out without a bailout address i… in ZEND_EXTERN_MODULE_GLOBALS() 31 phpdbg_signal_safe_mem *mem = &PHPDBG_G(sigsafe_mem); in phpdbg_set_sigsafe_mem() 48 return PHPDBG_G(sigsafe_mem).old_heap; in phpdbg_original_heap_sigsafe_mem() 53 PHPDBG_G(sigsafe_mem).mem = NULL; in phpdbg_clear_sigsafe_mem() 57 return !!PHPDBG_G(sigsafe_mem).mem; in phpdbg_active_sigsafe_mem()
|
H A D | phpdbg_bp.c | 57 b.id = PHPDBG_G(bp_count)++; \ 335 PHPDBG_G(flags) |= PHPDBG_HAS_FILE_BP; in phpdbg_set_breakpoint_file() 360 PHPDBG_G(flags) |= PHPDBG_HAS_FILE_BP; in phpdbg_resolve_pending_file_break_ex() 421 PHPDBG_G(flags) |= PHPDBG_HAS_SYM_BP; in phpdbg_set_breakpoint_symbol() 683 PHPDBG_G(bp_count)--; in phpdbg_set_breakpoint_method_opline() 729 PHPDBG_G(bp_count)--; in phpdbg_set_breakpoint_function_opline() 775 PHPDBG_G(bp_count)--; in phpdbg_set_breakpoint_file_opline() 898 PHPDBG_G(flags) |= PHPDBG_HAS_COND_BP; in phpdbg_create_conditional_break() 903 PHPDBG_G(bp_count)--; in phpdbg_create_conditional_break() 1275 PHPDBG_G(flags) &= ~PHPDBG_BP_MASK; in phpdbg_clear_breakpoints() [all …]
|
H A D | phpdbg_io.c | 52 int bytes = PHPDBG_G(input_buflen), len = 0; in ZEND_EXTERN_MODULE_GLOBALS() 54 if (PHPDBG_G(input_buflen)) { in ZEND_EXTERN_MODULE_GLOBALS() 55 memcpy(buf, PHPDBG_G(input_buffer), bytes); in ZEND_EXTERN_MODULE_GLOBALS() 58 PHPDBG_G(last_was_newline) = 1; in ZEND_EXTERN_MODULE_GLOBALS() 77 if (PHPDBG_G(input_buflen)) { in ZEND_EXTERN_MODULE_GLOBALS() 78 memcpy(PHPDBG_G(input_buffer), buf + i + 1, PHPDBG_G(input_buflen)); in ZEND_EXTERN_MODULE_GLOBALS() 182 if (PHPDBG_G(flags) & PHPDBG_IS_REMOTE) { 201 if (count % PHPDBG_G(lines) == 0) { 224 if (PHPDBG_G(flags) & PHPDBG_IS_REMOTE) { 229 && !(PHPDBG_G(flags) & PHPDBG_WRITE_XML) [all …]
|
H A D | phpdbg_out.c | 591 if (PHPDBG_G(req_id)) { in format_converter() 956 …if ((PHPDBG_G(flags) & PHPDBG_WRITE_XML) && PHPDBG_G(in_script_xml) && PHPDBG_G(in_script_xml) != … in phpdbg_process_print() 958 PHPDBG_G(in_script_xml) = 0; in phpdbg_process_print() 1063 if (PHPDBG_G(req_id)) { in phpdbg_process_print() 1086 if (PHPDBG_G(req_id) && (PHPDBG_G(flags) & PHPDBG_WRITE_XML)) { in phpdbg_process_print() 1123 PHPDBG_G(err_buf).fd = fd; in phpdbg_vprint() 1125 PHPDBG_G(err_buf).msg = msg; in phpdbg_vprint() 1153 PHPDBG_G(err_buf).type = 0; in phpdbg_free_err_buf() 1155 efree(PHPDBG_G(err_buf).tag); in phpdbg_free_err_buf() 1156 efree(PHPDBG_G(err_buf).msg); in phpdbg_free_err_buf() [all …]
|
H A D | phpdbg_parser.y | 77 : parameters { $$.top = PHPDBG_G(parser_stack)->top; } 78 …| full_expression { phpdbg_stack_push(PHPDBG_G(parser_stack), &$1); $$.top = PHPDBG_G(parser_stack… 82 …: parameter { phpdbg_stack_push(PHPDBG_G(parser_stack), &$1); $$.top = PHPDBG_G(parser_stack)->top… 83 …| parameters parameter { phpdbg_stack_push(PHPDBG_G(parser_stack), &$2); $$.top = PHPDBG_G(parser_… 150 : T_REQ_ID { PHPDBG_G(req_id) = $1.num; } 182 const phpdbg_param_t *top = PHPDBG_G(parser_stack); 197 if (PHPDBG_G(cur_command)) { in phpdbg_do_parse() 198 free(PHPDBG_G(cur_command)); in phpdbg_do_parse() 200 PHPDBG_G(cur_command) = strdup(input); in phpdbg_do_parse()
|
H A D | phpdbg_watch.c | 155 PHPDBG_G(watchpoint_hit) = 1; in phpdbg_print_watch_diff() 714 PHPDBG_G(watchpoint_hit) = 1; 986 PHPDBG_G(watchpoint_hit) = 1; 1100 PHPDBG_G(watchlist_mem) = PHPDBG_G(watchlist_mem_backup); 1128 PHPDBG_G(watchpoint_hit) = 0; 1244 if (PHPDBG_G(watch_tmp)) { 1257 PHPDBG_G(watch_tmp) = NULL; 1270 …if (PHPDBG_G(watch_tmp) && Z_ISREF_P(PHPDBG_G(watch_tmp)->watch->addr.zv) && Z_REFVAL_P(PHPDBG_G(w… 1287 if (PHPDBG_G(watch_tmp)) { 1290 PHPDBG_G(watch_tmp) = element; [all …]
|
H A D | phpdbg_eol.c | 40 PHPDBG_G(eol) = PHPDBG_EOL_CRLF; in phpdbg_eol_global_update() 42 PHPDBG_G(eol) = PHPDBG_EOL_LF; in phpdbg_eol_global_update() 44 PHPDBG_G(eol) = PHPDBG_EOL_CR; in phpdbg_eol_global_update() 92 if ((PHPDBG_G(flags) & PHPDBG_IS_REMOTE) != PHPDBG_IS_REMOTE) { in phpdbg_eol_convert() 97 if (PHPDBG_EOL_CRLF == PHPDBG_G(eol)) { /* XXX add LFCR case if it's gonna be needed */ in phpdbg_eol_convert() 133 } else if (PHPDBG_EOL_LF == PHPDBG_G(eol) || PHPDBG_EOL_CR == PHPDBG_G(eol)) { in phpdbg_eol_convert() 136 if (PHPDBG_EOL_LF == PHPDBG_G(eol)) { in phpdbg_eol_convert()
|
H A D | phpdbg_opcode.c | 148 (!(PHPDBG_G(flags) & PHPDBG_IS_QUIET) || in phpdbg_print_opline_ex() 149 (PHPDBG_G(flags) & PHPDBG_IS_STEPPING) || in phpdbg_print_opline_ex() 150 (PHPDBG_G(oplog)))) { in phpdbg_print_opline_ex() 155 …if (ignore_flags || (!(PHPDBG_G(flags) & PHPDBG_IS_QUIET) || (PHPDBG_G(flags) & PHPDBG_IS_STEPPING… in phpdbg_print_opline_ex() 164 if (!ignore_flags && PHPDBG_G(oplog)) { in phpdbg_print_opline_ex() 165 phpdbg_log_ex(fileno(PHPDBG_G(oplog)), "L%-5u %16p %s %s\n", in phpdbg_print_opline_ex() 175 if (PHPDBG_G(oplog_list)) { in phpdbg_print_opline_ex() 176 phpdbg_oplog_entry *cur = zend_arena_alloc(&PHPDBG_G(oplog_arena), sizeof(phpdbg_oplog_entry)); in phpdbg_print_opline_ex() 184 PHPDBG_G(oplog_cur)->next = cur; in phpdbg_print_opline_ex() 185 PHPDBG_G(oplog_cur) = cur; in phpdbg_print_opline_ex()
|
H A D | phpdbg_out.h | 43 #define phpdbg_error(tag, xmlfmt, strfmt, ...) phpdbg_print(P_ERROR , PHPDBG_G(io)[PH… 44 #define phpdbg_notice(tag, xmlfmt, strfmt, ...) phpdbg_print(P_NOTICE , PHPDBG_G(io)[PH… 45 #define phpdbg_writeln(tag, xmlfmt, strfmt, ...) phpdbg_print(P_WRITELN, PHPDBG_G(io)[PH… 46 #define phpdbg_write(tag, xmlfmt, strfmt, ...) phpdbg_print(P_WRITE , PHPDBG_G(io)[PH… 47 #define phpdbg_script(type, fmt, ...) phpdbg_print(type , PHPDBG_G(io)[PH… 48 #define phpdbg_log(fmt, ...) phpdbg_log_internal(PHPDBG_G(io)[PHPDBG_STDOUT].fd, fmt, ##__VA_ARGS__) 49 #define phpdbg_xml(fmt, ...) phpdbg_xml_internal(PHPDBG_G(io)[PHPDBG_STDOUT].fd, fmt, ##__VA_ARGS__) 50 #define phpdbg_out(fmt, ...) phpdbg_out_internal(PHPDBG_G(io)[PHPDBG_STDOUT].fd, fmt, ##__VA_ARGS__) 71 # define phpdbg_debug(fmt, ...) phpdbg_log_ex(PHPDBG_G(io)[PHPDBG_STDERR].fd, fmt, ##__VA_ARGS__)
|
H A D | phpdbg_wait.c | 196 if (PHPDBG_G(sapi_name_ptr)) { in phpdbg_webdata_decompress() 197 free(PHPDBG_G(sapi_name_ptr)); in phpdbg_webdata_decompress() 202 PHPDBG_G(sapi_name_ptr) = sapi_module.name = NULL; in phpdbg_webdata_decompress() 345 unlink(PHPDBG_G(socket_path)); in PHPDBG_COMMAND() 346 if (PHPDBG_G(socket_server_fd) == -1) { in PHPDBG_COMMAND() 365 chmod(PHPDBG_G(socket_path), 0666); in PHPDBG_COMMAND() 369 sl = PHPDBG_G(socket_server_fd); in PHPDBG_COMMAND() 376 close(PHPDBG_G(socket_server_fd)); in PHPDBG_COMMAND() 396 if (PHPDBG_G(socket_fd) != -1) { in PHPDBG_COMMAND() 397 close(PHPDBG_G(socket_fd)); in PHPDBG_COMMAND() [all …]
|
H A D | phpdbg_list.c | 51 if (!PHPDBG_G(exec) && !zend_is_executing()) { in PHPDBG_LIST() 257 ret = PHPDBG_G(compile_file)(file, type); in phpdbg_compile_file() 277 zend_hash_del(&PHPDBG_G(file_sources), ret->filename); in phpdbg_compile_file() 305 op_array = PHPDBG_G(init_compile_file)(file, type); in phpdbg_init_compile_file() 329 if (PHPDBG_G(flags) & PHPDBG_IN_EVAL) { in phpdbg_compile_string() 330 return PHPDBG_G(compile_string)(source_string, filename); in phpdbg_compile_string() 345 op_array = PHPDBG_G(compile_string)(source_string, filename); in phpdbg_compile_string() 356 zend_hash_add_ptr(&PHPDBG_G(file_sources), fake_name, dataptr); in phpdbg_compile_string() 369 PHPDBG_G(compile_file) = zend_compile_file; in phpdbg_init_list() 370 PHPDBG_G(compile_string) = zend_compile_string; in phpdbg_init_list() [all …]
|
H A D | phpdbg_utils.c | 165 return PHPDBG_G(exec); in phpdbg_current_file() 285 if (PHPDBG_G(prompt)[1]) { in phpdbg_set_prompt() 286 free(PHPDBG_G(prompt)[1]); in phpdbg_set_prompt() 287 PHPDBG_G(prompt)[1] = NULL; in phpdbg_set_prompt() 290 if (PHPDBG_G(prompt)[0]) { in phpdbg_set_prompt() 291 free(PHPDBG_G(prompt)[0]); in phpdbg_set_prompt() 292 PHPDBG_G(prompt)[0] = NULL; in phpdbg_set_prompt() 302 if (PHPDBG_G(prompt)[1]) { in phpdbg_get_prompt() 312 PHPDBG_G(prompt)[0])); in phpdbg_get_prompt() 316 ZEND_IGNORE_VALUE(asprintf(&PHPDBG_G(prompt)[1], "%s ", PHPDBG_G(prompt)[0])); in phpdbg_get_prompt() [all …]
|
H A D | phpdbg.h | 124 # define PHPDBG_G(v) TSRMG(phpdbg_globals_id, zend_phpdbg_globals *, v) macro 126 # define PHPDBG_G(v) (phpdbg_globals.v) macro 224 JMP_BUF *__orig_bailout = PHPDBG_G(sigsegv_bailout); \ 227 PHPDBG_G(sigsegv_bailout) = &__bailout; \ 231 PHPDBG_G(sigsegv_bailout) = __orig_bailout; 234 PHPDBG_G(sigsegv_bailout) = __orig_bailout; \
|
H A D | phpdbg_print.c | 44 if (PHPDBG_G(in_execution) && EG(current_execute_data)) { in PHPDBG_PRINT() 107 if (PHPDBG_G(exec)) { in PHPDBG_PRINT() 108 if (!PHPDBG_G(ops) && !(PHPDBG_G(flags) & PHPDBG_IN_SIGNAL_HANDLER)) { in PHPDBG_PRINT() 112 if (PHPDBG_G(ops)) { in PHPDBG_PRINT() 113 …e("printinfo", "file=\"%s\" num=\"%d\"", "Context %s (%d ops)", PHPDBG_G(exec), PHPDBG_G(ops)->las… in PHPDBG_PRINT() 115 phpdbg_print_function_helper((zend_function*) PHPDBG_G(ops)); in PHPDBG_PRINT() 126 if (PHPDBG_G(in_execution) && EG(current_execute_data)) { in PHPDBG_PRINT() 264 phpdbg_print_function_helper((zend_function *) PHPDBG_G(ops)); in phpdbg_print_opcodes_main()
|
H A D | phpdbg_cmd.c | 750 fflush(PHPDBG_G(io)[PHPDBG_STDOUT].ptr); in phpdbg_read_input() 756 if ((PHPDBG_G(flags) & PHPDBG_IS_REMOTE) || !isatty(PHPDBG_G(io)[PHPDBG_STDIN].fd)) in phpdbg_read_input() 765 PHPDBG_G(last_was_newline) = 1; in phpdbg_read_input() 768 PHPDBG_G(flags) |= PHPDBG_IS_QUITTING | PHPDBG_IS_DISCONNECTED; in phpdbg_read_input() 782 …if (!buffered && cmd && !(PHPDBG_G(flags) & PHPDBG_IS_REMOTE) && isatty(PHPDBG_G(io)[PHPDBG_STDIN]… in phpdbg_read_input() 799 if (PHPDBG_G(buffer)) { in phpdbg_read_input() 800 free(PHPDBG_G(buffer)); in phpdbg_read_input() 802 PHPDBG_G(buffer) = strdup(buffer); in phpdbg_read_input() 803 } else if (PHPDBG_G(buffer)) { in phpdbg_read_input() 807 buffer = estrdup(PHPDBG_G(buffer)); in phpdbg_read_input() [all …]
|
H A D | phpdbg_lexer.l | 10 #define LEX(v) (PHPDBG_G(lexer).v) 32 PHPDBG_G(parser_stack) = stack; in ZEND_EXTERN_MODULE_GLOBALS()
|
H A D | phpdbg_info.c | 166 if (PHPDBG_G(flags) & PHPDBG_IN_SIGNAL_HANDLER) { in phpdbg_arm_auto_global() 309 …zend_bool in_executor = PHPDBG_G(in_execution) && EG(current_execute_data) && EG(current_execute_d… in PHPDBG_INFO() 310 if (in_executor || PHPDBG_G(ops)) { in PHPDBG_INFO() 311 zend_op_array *ops = in_executor ? &EG(current_execute_data)->func->op_array : PHPDBG_G(ops); in PHPDBG_INFO() 349 if (PHPDBG_G(flags) & PHPDBG_IN_SIGNAL_HANDLER) { in PHPDBG_INFO() 358 if (PHPDBG_G(flags) & PHPDBG_IN_SIGNAL_HANDLER) { in PHPDBG_INFO()
|
H A D | phpdbg_parser.c | 1485 { (yyval).top = PHPDBG_G(parser_stack)->top; } 1491 …{ phpdbg_stack_push(PHPDBG_G(parser_stack), &(yyvsp[(1) - (1)])); (yyval).top = PHPDBG_G(parser_st… 1497 …{ phpdbg_stack_push(PHPDBG_G(parser_stack), &(yyvsp[(1) - (1)])); (yyval).top = PHPDBG_G(parser_st… 1503 …{ phpdbg_stack_push(PHPDBG_G(parser_stack), &(yyvsp[(2) - (2)])); (yyval).top = PHPDBG_G(parser_st… 1649 { PHPDBG_G(req_id) = (yyvsp[(1) - (1)]).num; } 1932 const phpdbg_param_t *top = PHPDBG_G(parser_stack); in yyerror() 1947 if (PHPDBG_G(cur_command)) { in phpdbg_do_parse() 1948 free(PHPDBG_G(cur_command)); in phpdbg_do_parse() 1950 PHPDBG_G(cur_command) = strdup(input); in phpdbg_do_parse()
|
H A D | phpdbg_help.c | 50 unsigned int prompt_len = strlen(PHPDBG_G(prompt)[0]); in pretty_print() 52 const char *bold_on_escape = PHPDBG_G(flags) & PHPDBG_IS_COLOURED ? "\033[1m" : ""; in pretty_print() 53 const char *bold_off_escape = PHPDBG_G(flags) & PHPDBG_IS_COLOURED ? "\033[0m" : ""; in pretty_print() 65 if (PHPDBG_G(flags) & PHPDBG_WRITE_XML) { in pretty_print()
|
H A D | phpdbg_cmd.h | 112 #define PHPDBG_FRAME(v) (PHPDBG_G(frame).v)
|
H A D | phpdbg_lexer.c | 12 #define LEX(v) (PHPDBG_G(lexer).v) 34 PHPDBG_G(parser_stack) = stack; in ZEND_EXTERN_MODULE_GLOBALS()
|