Lines Matching refs:PHPDBG_G

116 		if (zend_hash_str_exists(&PHPDBG_G(registered), lc_name, name->len)) {  in phpdbg_call_register()
291 PHPDBG_G(flags) &= ~(PHPDBG_IS_RUNNING | PHPDBG_IS_CLEANING); in phpdbg_line_init()
292 if (PHPDBG_G(flags) & PHPDBG_IS_QUITTING) { in phpdbg_line_init()
390 if (PHPDBG_G(ops)) { in phpdbg_clean()
391 destroy_op_array(PHPDBG_G(ops)); in phpdbg_clean()
392 efree(PHPDBG_G(ops)); in phpdbg_clean()
393 PHPDBG_G(ops) = NULL; in phpdbg_clean()
396 if (!resubmit && PHPDBG_G(cur_command)) { in phpdbg_clean()
397 free(PHPDBG_G(cur_command)); in phpdbg_clean()
398 PHPDBG_G(cur_command) = NULL; in phpdbg_clean()
402 PHPDBG_G(flags) |= PHPDBG_IS_CLEANING; in phpdbg_clean()
415 if ((res_len != PHPDBG_G(exec_len)) || (memcmp(res, PHPDBG_G(exec), res_len) != SUCCESS)) { in PHPDBG_COMMAND()
416 if (PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
422 if (PHPDBG_G(exec)) { in PHPDBG_COMMAND()
423 …ce("exec", "type=\"unset\" context=\"%s\"", "Unsetting old execution context: %s", PHPDBG_G(exec)); in PHPDBG_COMMAND()
424 efree(PHPDBG_G(exec)); in PHPDBG_COMMAND()
425 PHPDBG_G(exec) = NULL; in PHPDBG_COMMAND()
426 PHPDBG_G(exec_len) = 0L; in PHPDBG_COMMAND()
429 if (PHPDBG_G(ops)) { in PHPDBG_COMMAND()
434 PHPDBG_G(exec) = res; in PHPDBG_COMMAND()
435 PHPDBG_G(exec_len) = res_len; in PHPDBG_COMMAND()
439 *SG(request_info).argv = PHPDBG_G(exec); in PHPDBG_COMMAND()
442 … phpdbg_notice("exec", "type=\"set\" context=\"%s\"", "Set execution context: %s", PHPDBG_G(exec)); in PHPDBG_COMMAND()
444 if (PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
473 PHPDBG_G(input_buflen) += bytes; in PHPDBG_COMMAND()
474 if (PHPDBG_G(input_buflen) <= 0) { in PHPDBG_COMMAND()
479 char *nl = buf = PHPDBG_G(input_buffer); in PHPDBG_COMMAND()
483 smart_str_appendl(&code, PHPDBG_G(input_buffer), nl - PHPDBG_G(input_buffer)); in PHPDBG_COMMAND()
484 memmove(PHPDBG_G(input_buffer), ++buf, --PHPDBG_G(input_buflen)); in PHPDBG_COMMAND()
492 } while (--PHPDBG_G(input_buflen)); in PHPDBG_COMMAND()
494 smart_str_appendl(&code, PHPDBG_G(input_buffer), nl - PHPDBG_G(input_buffer)); in PHPDBG_COMMAND()
495 PHPDBG_G(input_buflen) = buf - nl; in PHPDBG_COMMAND()
496 memmove(PHPDBG_G(input_buffer), nl, PHPDBG_G(input_buflen)); in PHPDBG_COMMAND()
498 PHPDBG_G(input_buflen) = 0; in PHPDBG_COMMAND()
499 smart_str_appendl(&code, PHPDBG_G(input_buffer), buf - PHPDBG_G(input_buffer)); in PHPDBG_COMMAND()
502 smart_str_appendl(&code, PHPDBG_G(input_buffer), PHPDBG_G(input_buflen)); in PHPDBG_COMMAND()
503 PHPDBG_G(input_buflen) = 0; 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()
508 PHPDBG_G(flags) |= PHPDBG_IS_QUITTING | PHPDBG_IS_DISCONNECTED; in PHPDBG_COMMAND()
528 PHPDBG_G(ops) = zend_compile_string(&zv, "Standard input code"); in phpdbg_compile_stdin()
536 if (PHPDBG_G(exec)) { in phpdbg_compile_stdin()
537 efree(PHPDBG_G(exec)); in phpdbg_compile_stdin()
539 PHPDBG_G(exec) = estrdup("Standard input code"); in phpdbg_compile_stdin()
540 PHPDBG_G(exec_len) = sizeof("Standard input code") - 1; in phpdbg_compile_stdin()
544 zend_string *source_path = strpprintf(0, "Standard input code%c%p", 0, PHPDBG_G(ops)->opcodes); in phpdbg_compile_stdin()
545 phpdbg_file_source *data = zend_hash_find_ptr(&PHPDBG_G(file_sources), source_path); in phpdbg_compile_stdin()
546 dtor_func_t dtor = PHPDBG_G(file_sources).pDestructor; in phpdbg_compile_stdin()
547 PHPDBG_G(file_sources).pDestructor = NULL; in phpdbg_compile_stdin()
548 zend_hash_del(&PHPDBG_G(file_sources), source_path); in phpdbg_compile_stdin()
549 PHPDBG_G(file_sources).pDestructor = dtor; in phpdbg_compile_stdin()
550 …zend_hash_str_update_ptr(&PHPDBG_G(file_sources), "Standard input code", sizeof("Standard input co… in phpdbg_compile_stdin()
574 if (!PHPDBG_G(exec)) { in phpdbg_compile()
579 …if (php_stream_open_for_zend_ex(PHPDBG_G(exec), &fh, USE_PATH|STREAM_OPEN_FOR_INCLUDE) == SUCCESS … in phpdbg_compile()
600 PHPDBG_G(ops) = zend_compile_file(&fh, ZEND_INCLUDE); in phpdbg_compile()
604 phpdbg_file_source *data = zend_hash_find_ptr(&PHPDBG_G(file_sources), PHPDBG_G(ops)->filename); in phpdbg_compile()
606 dtor_func_t dtor = PHPDBG_G(file_sources).pDestructor; in phpdbg_compile()
607 PHPDBG_G(file_sources).pDestructor = NULL; in phpdbg_compile()
608 zend_hash_del(&PHPDBG_G(file_sources), PHPDBG_G(ops)->filename); in phpdbg_compile()
609 PHPDBG_G(file_sources).pDestructor = dtor; in phpdbg_compile()
622 zend_hash_update_ptr(&PHPDBG_G(file_sources), PHPDBG_G(ops)->filename, data); in phpdbg_compile()
633 phpdbg_notice("compile", "context=\"%s\"", "Successful compilation of %s", PHPDBG_G(exec)); in phpdbg_compile()
637 …phpdbg_error("compile", "type=\"openfailure\" context=\"%s\"", "Could not open file %s", PHPDBG_G(… in phpdbg_compile()
645 if (PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
646 PHPDBG_G(flags) |= PHPDBG_IS_STEPPING; in PHPDBG_COMMAND()
662 PHPDBG_G(flags) |= PHPDBG_IN_UNTIL; in phpdbg_skip_line_helper()
663 PHPDBG_G(seek_ex) = ex; in phpdbg_skip_line_helper()
673 zend_hash_index_update_ptr(&PHPDBG_G(seek), (zend_ulong) opline, (void *) opline); in phpdbg_skip_line_helper()
683 if (!PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
693 if (!PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
698 PHPDBG_G(flags) |= PHPDBG_IS_STEPPING; in PHPDBG_COMMAND()
707 PHPDBG_G(seek_ex) = ex; in phpdbg_seek_to_end()
716 zend_hash_index_update_ptr(&PHPDBG_G(seek), (zend_ulong) opline, (void *) opline); in phpdbg_seek_to_end()
724 if (!PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
730 …if (zend_hash_index_exists(&PHPDBG_G(seek), (zend_ulong) phpdbg_user_execute_data(EG(current_execu… in PHPDBG_COMMAND()
731 zend_hash_clean(&PHPDBG_G(seek)); in PHPDBG_COMMAND()
733 PHPDBG_G(flags) |= PHPDBG_IN_FINISH; in PHPDBG_COMMAND()
741 if (!PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
747 …if (zend_hash_index_exists(&PHPDBG_G(seek), (zend_ulong) phpdbg_user_execute_data(EG(current_execu… in PHPDBG_COMMAND()
748 zend_hash_clean(&PHPDBG_G(seek)); in PHPDBG_COMMAND()
752 PHPDBG_G(flags) |= PHPDBG_IN_LEAVE; in PHPDBG_COMMAND()
760 phpdbg_notice("frame", "id=\"%d\"", "Currently in frame #%d", PHPDBG_G(frame).num); in PHPDBG_COMMAND()
808 if (PHPDBG_G(ops) || PHPDBG_G(exec)) { in PHPDBG_COMMAND()
812 if (PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
820 if (!PHPDBG_G(ops)) { in PHPDBG_COMMAND()
822 …le", "type=\"compilefailure\" context=\"%s\"", "Failed to compile %s, cannot run", PHPDBG_G(exec)); in PHPDBG_COMMAND()
866 PHPDBG_G(stdin_file) = fopen(buf, "r"); in PHPDBG_COMMAND()
867 if (PHPDBG_G(stdin_file) == NULL) { in PHPDBG_COMMAND()
930 PHPDBG_G(handled_exception) = NULL; in PHPDBG_COMMAND()
933 PHPDBG_G(flags) &= ~PHPDBG_SEEK_MASK; in PHPDBG_COMMAND()
934 zend_hash_clean(&PHPDBG_G(seek)); in PHPDBG_COMMAND()
940 PHPDBG_G(flags) ^= PHPDBG_IS_INTERACTIVE; in PHPDBG_COMMAND()
941 PHPDBG_G(flags) |= PHPDBG_IS_RUNNING; in PHPDBG_COMMAND()
942 zend_execute(PHPDBG_G(ops), &PHPDBG_G(retval)); in PHPDBG_COMMAND()
943 PHPDBG_G(flags) ^= PHPDBG_IS_INTERACTIVE; in PHPDBG_COMMAND()
945 PHPDBG_G(in_execution) = 0; in PHPDBG_COMMAND()
947 if (!(PHPDBG_G(flags) & PHPDBG_IS_STOPPING)) { in PHPDBG_COMMAND()
954 if (PHPDBG_G(socket_fd) != -1) { in PHPDBG_COMMAND()
955 close(PHPDBG_G(socket_fd)); in PHPDBG_COMMAND()
956 PHPDBG_G(socket_fd) = -1; in PHPDBG_COMMAND()
963 PHPDBG_G(in_execution) = 1; in PHPDBG_COMMAND()
965 PHPDBG_G(in_execution) = 0; in PHPDBG_COMMAND()
967 if (PHPDBG_G(flags) & PHPDBG_IS_STOPPING) { in PHPDBG_COMMAND()
977 PHPDBG_G(flags) &= ~PHPDBG_IS_RUNNING; in PHPDBG_COMMAND()
1005 zend_bool stepping = ((PHPDBG_G(flags) & PHPDBG_IS_STEPPING) == PHPDBG_IS_STEPPING); in PHPDBG_COMMAND()
1016 if (PHPDBG_G(flags) & PHPDBG_IN_SIGNAL_HANDLER) { in PHPDBG_COMMAND()
1027 if (!(PHPDBG_G(flags) & PHPDBG_IS_STEPONEVAL)) { in PHPDBG_COMMAND()
1028 PHPDBG_G(flags) &= ~PHPDBG_IS_STEPPING; in PHPDBG_COMMAND()
1032 PHPDBG_G(flags) |= PHPDBG_IN_EVAL; in PHPDBG_COMMAND()
1040 if (PHPDBG_G(flags) & PHPDBG_WRITE_XML) { in PHPDBG_COMMAND()
1051 PHPDBG_G(unclean_eval) = 1; in PHPDBG_COMMAND()
1062 PHPDBG_G(flags) &= ~PHPDBG_IN_EVAL; in PHPDBG_COMMAND()
1065 if (stepping && !(PHPDBG_G(flags) & PHPDBG_IS_STEPONEVAL)) { in PHPDBG_COMMAND()
1066 PHPDBG_G(flags) |= PHPDBG_IS_STEPPING; in PHPDBG_COMMAND()
1078 if (!PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
1096 if (!PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
1176 …phpdbg_writeln("info", "context=\"%s\"", "Exec %s", PHPDBG_G(exec) ? PHPDBG_G(exec) : "none"… in PHPDBG_COMMAND()
1177 phpdbg_writeln("info", "compiled=\"%s\"", "Compiled %s", PHPDBG_G(ops) ? "yes" : "no"); in PHPDBG_COMMAND()
1178 …phpdbg_writeln("info", "stepping=\"%s\"", "Stepping %s", (PHPDBG_G(flags) & PHPDBG_IS_STEPPING) … in PHPDBG_COMMAND()
1179 …phpdbg_writeln("info", "quiet=\"%s\"", "Quietness %s", (PHPDBG_G(flags) & PHPDBG_IS_QUIET) ? "on"… in PHPDBG_COMMAND()
1180 phpdbg_writeln("info", "oplog=\"%s\"", "Oplog %s", PHPDBG_G(oplog) ? "on" : "off"); in PHPDBG_COMMAND()
1182 if (PHPDBG_G(ops)) { in PHPDBG_COMMAND()
1183 phpdbg_writeln("info", "ops=\"%d\"", "Opcodes %d", PHPDBG_G(ops)->last); in PHPDBG_COMMAND()
1184 …phpdbg_writeln("info", "vars=\"%d\"", "Variables %d", PHPDBG_G(ops)->last_var ? PHPDBG_G(ops)->la… in PHPDBG_COMMAND()
1187 phpdbg_writeln("info", "executing=\"%d\"", "Executing %s", PHPDBG_G(in_execution) ? "yes" : "no"); in PHPDBG_COMMAND()
1188 if (PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
1189 phpdbg_writeln("info", "vmret=\"%d\"", "VM Return %d", PHPDBG_G(vmret)); in PHPDBG_COMMAND()
1211 if (PHPDBG_G(exec)) { in PHPDBG_COMMAND()
1224 if (PHPDBG_G(exec)) { in PHPDBG_COMMAND()
1499 if (!zend_hash_str_exists(&PHPDBG_G(registered), lcname, lcname_len)) { in PHPDBG_COMMAND()
1501 zend_hash_str_update_ptr(&PHPDBG_G(registered), lcname, lcname_len, function); in PHPDBG_COMMAND()
1518 PHPDBG_G(flags) |= PHPDBG_IS_QUITTING; in PHPDBG_COMMAND()
1519 PHPDBG_G(flags) &= ~PHPDBG_IS_CLEANING; in PHPDBG_COMMAND()
1526 if (PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
1552 …phpdbg_writeln("clear", "files=\"%d\"", "File %d", zend_hash_num_elements(&PHPDBG_G(b… in PHPDBG_COMMAND()
1553 …r", "functions=\"%d\"", "Functions %d", zend_hash_num_elements(&PHPDBG_G(bp)[PHPDBG_BREAK_… in PHPDBG_COMMAND()
1554 …phpdbg_writeln("clear", "methods=\"%d\"", "Methods %d", zend_hash_num_elements(&PHPDBG_G in PHPDBG_COMMAND()
1555 …phpdbg_writeln("clear", "oplines=\"%d\"", "Oplines %d", zend_hash_num_elements(&PHPDBG_G in PHPDBG_COMMAND()
1556 …, "fileoplines=\"%d\"", "File oplines %d", zend_hash_num_elements(&PHPDBG_G(bp)[PHPDBG_BREAK_… in PHPDBG_COMMAND()
1557 …unctionoplines=\"%d\"", "Function oplines %d", zend_hash_num_elements(&PHPDBG_G(bp)[PHPDBG_BREAK_… in PHPDBG_COMMAND()
1558 …"methodoplines=\"%d\"", "Method oplines %d", zend_hash_num_elements(&PHPDBG_G(bp)[PHPDBG_BREAK_… in PHPDBG_COMMAND()
1559 …phpdbg_writeln("clear", "eval=\"%d\"", "Conditionals %d", zend_hash_num_elements(&PHPDBG_G(bp… in PHPDBG_COMMAND()
1612 PHPDBG_G(flags) |= PHPDBG_IS_INTERACTIVE; in phpdbg_interactive()
1615 if (PHPDBG_G(flags) & PHPDBG_IS_STOPPING) { in phpdbg_interactive()
1631 if (PHPDBG_G(flags) & PHPDBG_IS_REMOTE && (RUN_PARAM == PARA || EVAL_PARAM == PARA)) { in phpdbg_interactive()
1637 if (!(PHPDBG_G(flags) & PHPDBG_IS_STOPPING)) { in phpdbg_interactive()
1650 if (!PHPDBG_G(in_execution) && !(PHPDBG_G(flags) & PHPDBG_IS_STOPPING)) { in phpdbg_interactive()
1660 if (PHPDBG_G(flags) & PHPDBG_IS_REMOTE && (RUN_PARAM == PARA || EVAL_PARAM == PARA)) { in phpdbg_interactive()
1669 PHPDBG_G(req_id) = 0; in phpdbg_interactive()
1676 PHPDBG_G(req_id) = 0; in phpdbg_interactive()
1679 if (PHPDBG_G(in_execution)) { in phpdbg_interactive()
1683 PHPDBG_G(flags) &= ~PHPDBG_IS_INTERACTIVE; in phpdbg_interactive()
1702 if (!(PHPDBG_G(flags) & PHPDBG_IN_EVAL)) { \
1734 zend_bool original_in_execution = PHPDBG_G(in_execution); in phpdbg_execute_ex()
1736 if ((PHPDBG_G(flags) & PHPDBG_IS_STOPPING) && !(PHPDBG_G(flags) & PHPDBG_IS_RUNNING)) { in phpdbg_execute_ex()
1740 PHPDBG_G(in_execution) = 1; in phpdbg_execute_ex()
1745 if ((PHPDBG_G(flags) & PHPDBG_BP_RESOLVE_MASK)) { in phpdbg_execute_ex()
1756 if (PHPDBG_G(flags) & PHPDBG_PREVENT_INTERACTIVE) { in phpdbg_execute_ex()
1762 …if (exception && PHPDBG_G(handled_exception) != exception && !(PHPDBG_G(flags) & PHPDBG_IN_EVAL)) { in phpdbg_execute_ex()
1780 PHPDBG_G(handled_exception) = exception; in phpdbg_execute_ex()
1800 if (PHPDBG_G(flags) & (PHPDBG_IN_COND_BP | PHPDBG_IS_INITIALIZING)) { in phpdbg_execute_ex()
1809 if ((PHPDBG_G(flags) & PHPDBG_SEEK_MASK) && !(PHPDBG_G(flags) & PHPDBG_IN_EVAL)) { in phpdbg_execute_ex()
1813 if (PHPDBG_G(seek_ex) != execute_data) { in phpdbg_execute_ex()
1814 if (PHPDBG_G(flags) & PHPDBG_IS_STEPPING) { in phpdbg_execute_ex()
1820 #define INDEX_EXISTS_CHECK (zend_hash_index_exists(&PHPDBG_G(seek), address) || (exception && phpdb… in phpdbg_execute_ex()
1823 if (PHPDBG_G(flags) & PHPDBG_IN_UNTIL) { in phpdbg_execute_ex()
1825 PHPDBG_G(flags) &= ~PHPDBG_IN_UNTIL; in phpdbg_execute_ex()
1826 zend_hash_clean(&PHPDBG_G(seek)); in phpdbg_execute_ex()
1834 if (PHPDBG_G(flags) & PHPDBG_IN_FINISH) { in phpdbg_execute_ex()
1836 PHPDBG_G(flags) &= ~PHPDBG_IN_FINISH; in phpdbg_execute_ex()
1837 zend_hash_clean(&PHPDBG_G(seek)); in phpdbg_execute_ex()
1844 if (PHPDBG_G(flags) & PHPDBG_IN_LEAVE) { in phpdbg_execute_ex()
1846 PHPDBG_G(flags) &= ~PHPDBG_IN_LEAVE; in phpdbg_execute_ex()
1847 zend_hash_clean(&PHPDBG_G(seek)); in phpdbg_execute_ex()
1860 …if (PHPDBG_G(flags) & PHPDBG_IS_STEPPING && (PHPDBG_G(flags) & PHPDBG_STEP_OPCODE || execute_data-… in phpdbg_execute_ex()
1862 PHPDBG_G(flags) &= ~PHPDBG_IS_STEPPING; in phpdbg_execute_ex()
1877 if ((PHPDBG_G(flags) & PHPDBG_BP_MASK) in phpdbg_execute_ex()
1879 … && (brake->type != PHPDBG_BREAK_FILE || execute_data->opline->lineno != PHPDBG_G(last_line))) { in phpdbg_execute_ex()
1885 if (PHPDBG_G(flags) & PHPDBG_IS_SIGNALED) { in phpdbg_execute_ex()
1886 PHPDBG_G(flags) &= ~PHPDBG_IS_SIGNALED; in phpdbg_execute_ex()
1895 PHPDBG_G(last_line) = execute_data->opline->lineno; in phpdbg_execute_ex()
1904 PHPDBG_G(vmret) = zend_vm_call_opcode_handler(execute_data); in phpdbg_execute_ex()
1907 if (PHPDBG_G(vmret) != 0) { in phpdbg_execute_ex()
1908 if (PHPDBG_G(vmret) < 0) { in phpdbg_execute_ex()
1909 PHPDBG_G(in_execution) = original_in_execution; in phpdbg_execute_ex()
1924 PHPDBG_G(flags) |= PHPDBG_IN_SIGNAL_HANDLER; in phpdbg_force_interruption()
1945 PHPDBG_G(flags) &= ~PHPDBG_IN_SIGNAL_HANDLER; in phpdbg_force_interruption()
1947 if (PHPDBG_G(flags) & PHPDBG_IS_STOPPING) { in phpdbg_force_interruption()