/PHP-8.3/sapi/phpdbg/ |
H A D | phpdbg_prompt.c | 382 if (PHPDBG_G(ops)) { in phpdbg_clean() 384 efree(PHPDBG_G(ops)); in phpdbg_clean() 385 PHPDBG_G(ops) = NULL; in phpdbg_clean() 432 *SG(request_info).argv = estrndup(PHPDBG_G(exec), PHPDBG_G(exec_len)); in PHPDBG_COMMAND() 478 memmove(PHPDBG_G(input_buffer), ++buf, --PHPDBG_G(input_buflen)); in PHPDBG_COMMAND() 490 memmove(PHPDBG_G(input_buffer), nl, PHPDBG_G(input_buflen)); in PHPDBG_COMMAND() 499 …tes = phpdbg_mixed_read(PHPDBG_G(io)[PHPDBG_STDIN].fd, PHPDBG_G(input_buffer) + PHPDBG_G(input_buf… in PHPDBG_COMMAND() 525 if (PHPDBG_G(exec)) { in phpdbg_compile_stdin() 749 if (PHPDBG_G(ops) || PHPDBG_G(exec)) { in PHPDBG_COMMAND() 884 zend_execute(PHPDBG_G(ops), &PHPDBG_G(retval)); in PHPDBG_COMMAND() [all …]
|
H A D | phpdbg.c | 193 if (PHPDBG_G(buffer)) { in PHP_MSHUTDOWN_FUNCTION() 198 if (PHPDBG_G(exec)) { in PHP_MSHUTDOWN_FUNCTION() 199 free(PHPDBG_G(exec)); in PHP_MSHUTDOWN_FUNCTION() 200 PHPDBG_G(exec) = NULL; in PHP_MSHUTDOWN_FUNCTION() 273 ZVAL_STRINGL(return_value, PHPDBG_G(exec), PHPDBG_G(exec_len)); in PHP_FUNCTION() 428 PHPDBG_G(oplog_cur) = &PHPDBG_G(oplog_list)->start; in PHP_FUNCTION() 803 if (PHPDBG_G(ops)) { in php_sapi_phpdbg_deactivate() 821 if (PHPDBG_G(exec)) { in php_sapi_phpdbg_register_vars() 1433 PHPDBG_G(exec_len) = PHPDBG_G(exec) ? strlen(PHPDBG_G(exec)) : 0; in main() 1678 …phpdbg_file_source *data = zend_hash_str_find_ptr(&PHPDBG_G(file_sources), PHPDBG_G(exec), PHPDBG_… in main() [all …]
|
H A D | phpdbg_out.c | 49 if (!PHPDBG_G(last_was_newline)) { in phpdbg_process_print() 51 PHPDBG_G(last_was_newline) = 1; in phpdbg_process_print() 63 PHPDBG_G(last_was_newline) = 1; in phpdbg_process_print() 79 PHPDBG_G(last_was_newline) = 1; in phpdbg_process_print() 138 PHPDBG_G(err_buf).type = type; in phpdbg_vprint() 139 PHPDBG_G(err_buf).fd = fd; in phpdbg_vprint() 140 PHPDBG_G(err_buf).msg = msg; in phpdbg_vprint() 164 free(PHPDBG_G(err_buf).msg); in phpdbg_free_err_buf() 166 PHPDBG_G(err_buf).type = 0; in phpdbg_free_err_buf() 182 PHPDBG_G(err_buf).active = 0; in phpdbg_output_err_buf() [all …]
|
H A D | phpdbg_io.c | 27 int bytes = PHPDBG_G(input_buflen), len = 0; in ZEND_EXTERN_MODULE_GLOBALS() 29 if (PHPDBG_G(input_buflen)) { in ZEND_EXTERN_MODULE_GLOBALS() 30 memcpy(buf, PHPDBG_G(input_buffer), bytes); in ZEND_EXTERN_MODULE_GLOBALS() 33 PHPDBG_G(last_was_newline) = 1; in ZEND_EXTERN_MODULE_GLOBALS() 52 if (PHPDBG_G(input_buflen)) { in ZEND_EXTERN_MODULE_GLOBALS() 53 memcpy(PHPDBG_G(input_buffer), buf + i + 1, PHPDBG_G(input_buflen)); in ZEND_EXTERN_MODULE_GLOBALS() 66 PHPDBG_G(flags) |= PHPDBG_IS_QUITTING; in ZEND_EXTERN_MODULE_GLOBALS() 91 if (count % PHPDBG_G(lines) == 0) { in phpdbg_output_pager() 105 if (bytes && count % PHPDBG_G(lines) != 0) { in phpdbg_output_pager() 115 && PHPDBG_G(io)[PHPDBG_STDOUT].fd == fd in phpdbg_mixed_write() [all …]
|
H A D | phpdbg_set.c | 65 PHPDBG_G(flags) |= PHPDBG_HAS_PAGINATION; in PHPDBG_SET() 84 PHPDBG_G(lines) = param->num; in PHPDBG_SET() 154 if (PHPDBG_G(prompt)[1]) { in PHPDBG_SET() 155 free(PHPDBG_G(prompt)[1]); in PHPDBG_SET() 156 PHPDBG_G(prompt)[1]=NULL; in PHPDBG_SET() 185 PHPDBG_G(flags) |= PHPDBG_IS_COLOURED; in PHPDBG_SET() 187 PHPDBG_G(flags) &= ~PHPDBG_IS_COLOURED; in PHPDBG_SET() 206 PHPDBG_G(flags) |= PHPDBG_IS_QUIET; in PHPDBG_SET() 208 PHPDBG_G(flags) &= ~PHPDBG_IS_QUIET; in PHPDBG_SET() 225 PHPDBG_G(flags) |= PHPDBG_STEP_OPCODE; 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 | 54 b.id = PHPDBG_G(bp_count)++; \ 332 PHPDBG_G(flags) |= PHPDBG_HAS_FILE_BP; in phpdbg_set_breakpoint_file() 357 PHPDBG_G(flags) |= PHPDBG_HAS_FILE_BP; in phpdbg_resolve_pending_file_break_ex() 418 PHPDBG_G(flags) |= PHPDBG_HAS_SYM_BP; in phpdbg_set_breakpoint_symbol() 680 PHPDBG_G(bp_count)--; in phpdbg_set_breakpoint_method_opline() 726 PHPDBG_G(bp_count)--; in phpdbg_set_breakpoint_function_opline() 772 PHPDBG_G(bp_count)--; in phpdbg_set_breakpoint_file_opline() 891 PHPDBG_G(flags) |= PHPDBG_HAS_COND_BP; in phpdbg_create_conditional_break() 896 PHPDBG_G(bp_count)--; in phpdbg_create_conditional_break() 1268 PHPDBG_G(flags) &= ~PHPDBG_BP_MASK; in phpdbg_clear_breakpoints() [all …]
|
H A D | phpdbg_out.h | 39 #define phpdbg_error(strfmt, ...) phpdbg_print(P_ERROR , PHPDBG_G(io)[PHPDBG_STDOUT].… 40 #define phpdbg_notice(strfmt, ...) phpdbg_print(P_NOTICE , PHPDBG_G(io)[PHPDBG_STDOUT].… 41 #define phpdbg_writeln(strfmt, ...) phpdbg_print(P_WRITELN, PHPDBG_G(io)[PHPDBG_STDOUT].… 42 #define phpdbg_write(strfmt, ...) phpdbg_print(P_WRITE , PHPDBG_G(io)[PHPDBG_STDOUT].… 44 #define phpdbg_log(fmt, ...) phpdbg_log_internal(PHPDBG_G(io)[PHPDBG_STDOUT].fd, … 45 #define phpdbg_out(fmt, ...) phpdbg_out_internal(PHPDBG_G(io)[PHPDBG_STDOUT].fd, … 47 #define phpdbg_script(type, strfmt, ...) phpdbg_print(type, PHPDBG_G(io)[PHPDBG_STDOUT].… 53 # define phpdbg_debug(strfmt, ...) phpdbg_log_internal(PHPDBG_G(io)[PHPDBG_STDERR].fd, strfmt, ##__…
|
H A D | phpdbg_watch.c | 162 PHPDBG_G(watchpoint_hit) = 1; in phpdbg_print_watch_diff() 769 PHPDBG_G(watchpoint_hit) = 1; 1174 PHPDBG_G(watchlist_mem) = PHPDBG_G(watchlist_mem_backup); 1202 PHPDBG_G(watchpoint_hit) = 0; 1314 if (PHPDBG_G(watch_tmp)) { 1329 PHPDBG_G(watch_tmp) = NULL; 1342 …if (PHPDBG_G(watch_tmp) && Z_ISREF_P(PHPDBG_G(watch_tmp)->watch->addr.zv) && Z_REFVAL_P(PHPDBG_G(w… 1359 if (PHPDBG_G(watch_tmp)) { 1362 PHPDBG_G(watch_tmp) = element; 1476 PHPDBG_G(original_watchlist_mem) = PHPDBG_G(watchlist_mem); [all …]
|
H A D | phpdbg_parser.y | 73 : parameters { $$.top = PHPDBG_G(parser_stack)->top; } 74 …| full_expression { phpdbg_stack_push(PHPDBG_G(parser_stack), &$1); $$.top = PHPDBG_G(parser_stack… 78 …: parameter { phpdbg_stack_push(PHPDBG_G(parser_stack), &$1); $$.top = PHPDBG_G(parser_stack)->top… 79 …| parameters parameter { phpdbg_stack_push(PHPDBG_G(parser_stack), &$2); $$.top = PHPDBG_G(parser_… 80 | parameters T_REQ_ID { $$ = $1; PHPDBG_G(req_id) = $2.num; } 146 : T_REQ_ID { PHPDBG_G(req_id) = $1.num; } 178 const phpdbg_param_t *top = PHPDBG_G(parser_stack); 193 if (PHPDBG_G(cur_command)) { in phpdbg_do_parse() 194 free(PHPDBG_G(cur_command)); in phpdbg_do_parse() 196 PHPDBG_G(cur_command) = strdup(input); in phpdbg_do_parse()
|
H A D | phpdbg_print.c | 43 if (PHPDBG_G(in_execution) && EG(current_execute_data)) { in PHPDBG_PRINT() 82 if (PHPDBG_G(exec)) { in PHPDBG_PRINT() 83 if (!PHPDBG_G(ops) && !(PHPDBG_G(flags) & PHPDBG_IN_SIGNAL_HANDLER)) { in PHPDBG_PRINT() 87 if (PHPDBG_G(ops)) { in PHPDBG_PRINT() 88 phpdbg_notice("Context %s (%d ops)", PHPDBG_G(exec), PHPDBG_G(ops)->last); in PHPDBG_PRINT() 90 phpdbg_print_function_helper((zend_function*) PHPDBG_G(ops)); in PHPDBG_PRINT() 101 if (PHPDBG_G(in_execution) && EG(current_execute_data)) { in PHPDBG_PRINT() 367 …if (ignore_flags || (!(PHPDBG_G(flags) & PHPDBG_IS_QUIET) && (PHPDBG_G(flags) & PHPDBG_IS_STEPPING… in phpdbg_print_opline() 371 if (PHPDBG_G(oplog_list)) { in phpdbg_print_opline() 380 PHPDBG_G(oplog_cur)->next = cur; in phpdbg_print_opline() [all …]
|
H A D | phpdbg_list.c | 49 if (!PHPDBG_G(exec) && !zend_is_executing()) { in PHPDBG_LIST() 250 ret = PHPDBG_G(compile_file)(file, type); in phpdbg_compile_file() 270 zend_hash_del(&PHPDBG_G(file_sources), ret->filename); in phpdbg_compile_file() 271 zend_hash_add_ptr(&PHPDBG_G(file_sources), ret->filename, dataptr); in phpdbg_compile_file() 295 op_array = PHPDBG_G(init_compile_file)(file, type); in phpdbg_init_compile_file() 319 if (PHPDBG_G(flags) & PHPDBG_IN_EVAL) { in phpdbg_compile_string() 320 return PHPDBG_G(compile_string)(source_string, filename, position); in phpdbg_compile_string() 346 zend_hash_add_ptr(&PHPDBG_G(file_sources), fake_name, dataptr); in phpdbg_compile_string() 359 PHPDBG_G(compile_file) = zend_compile_file; in phpdbg_init_list() 360 PHPDBG_G(compile_string) = zend_compile_string; in phpdbg_init_list() [all …]
|
H A D | phpdbg_utils.c | 162 return PHPDBG_G(exec); in phpdbg_current_file() 282 if (PHPDBG_G(prompt)[1]) { in phpdbg_set_prompt() 283 free(PHPDBG_G(prompt)[1]); in phpdbg_set_prompt() 284 PHPDBG_G(prompt)[1] = NULL; in phpdbg_set_prompt() 287 if (PHPDBG_G(prompt)[0]) { in phpdbg_set_prompt() 288 free(PHPDBG_G(prompt)[0]); in phpdbg_set_prompt() 289 PHPDBG_G(prompt)[0] = NULL; in phpdbg_set_prompt() 299 if (PHPDBG_G(prompt)[1]) { in phpdbg_get_prompt() 326 PHPDBG_G(prompt)[0])); in phpdbg_get_prompt() 330 ZEND_IGNORE_VALUE(asprintf(&PHPDBG_G(prompt)[1], "%s ", PHPDBG_G(prompt)[0])); in phpdbg_get_prompt() [all …]
|
H A D | phpdbg.h | 100 # define PHPDBG_G(v) ZEND_TSRMG(phpdbg_globals_id, zend_phpdbg_globals *, v) macro 102 # define PHPDBG_G(v) (phpdbg_globals.v) macro 196 JMP_BUF *__orig_bailout = PHPDBG_G(sigsegv_bailout); \ 199 PHPDBG_G(sigsegv_bailout) = &__bailout; \ 203 PHPDBG_G(sigsegv_bailout) = __orig_bailout; 206 PHPDBG_G(sigsegv_bailout) = __orig_bailout; \
|
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_cmd.c | 750 if ((PHPDBG_G(flags) & (PHPDBG_IS_STOPPING | PHPDBG_IS_RUNNING)) != PHPDBG_IS_STOPPING) { in phpdbg_read_input() 756 if (!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; in phpdbg_read_input() 797 if (PHPDBG_G(buffer)) { in phpdbg_read_input() 798 free(PHPDBG_G(buffer)); in phpdbg_read_input() 800 PHPDBG_G(buffer) = strdup(buffer); in phpdbg_read_input() 801 } else if (PHPDBG_G(buffer)) { in phpdbg_read_input() 805 buffer = estrdup(PHPDBG_G(buffer)); in phpdbg_read_input()
|
H A D | phpdbg_info.c | 166 if (PHPDBG_G(flags) & PHPDBG_IN_SIGNAL_HANDLER) { in phpdbg_arm_auto_global() 307 …bool in_executor = PHPDBG_G(in_execution) && EG(current_execute_data) && EG(current_execute_data)-… in PHPDBG_INFO() 308 if (in_executor || PHPDBG_G(ops)) { in PHPDBG_INFO() 309 zend_op_array *ops = in_executor ? &EG(current_execute_data)->func->op_array : PHPDBG_G(ops); in PHPDBG_INFO() 347 if (PHPDBG_G(flags) & PHPDBG_IN_SIGNAL_HANDLER) { in PHPDBG_INFO()
|
H A D | phpdbg_help.c | 47 size_t prompt_len = strlen(PHPDBG_G(prompt)[0]); in pretty_print() 49 const char *bold_on_escape = PHPDBG_G(flags) & PHPDBG_IS_COLOURED ? "\033[1m" : ""; in pretty_print() 50 const char *bold_off_escape = PHPDBG_G(flags) & PHPDBG_IS_COLOURED ? "\033[0m" : ""; in pretty_print()
|
H A D | phpdbg_cmd.h | 106 #define PHPDBG_FRAME(v) (PHPDBG_G(frame).v)
|