Lines Matching refs:PHPDBG_G

118 		if (zend_hash_str_exists(&PHPDBG_G(registered), lc_name, name->len)) {  in phpdbg_call_register()
126 fci.function_table = &PHPDBG_G(registered); in phpdbg_call_register()
295 PHPDBG_G(flags) &= ~(PHPDBG_IS_RUNNING | PHPDBG_IS_CLEANING); in phpdbg_line_init()
296 if (PHPDBG_G(flags) & PHPDBG_IS_QUITTING) { in phpdbg_line_init()
394 if (PHPDBG_G(ops)) { in phpdbg_clean()
395 destroy_op_array(PHPDBG_G(ops)); in phpdbg_clean()
396 efree(PHPDBG_G(ops)); in phpdbg_clean()
397 PHPDBG_G(ops) = NULL; in phpdbg_clean()
400 if (!resubmit && PHPDBG_G(cur_command)) { in phpdbg_clean()
401 free(PHPDBG_G(cur_command)); in phpdbg_clean()
402 PHPDBG_G(cur_command) = NULL; in phpdbg_clean()
406 PHPDBG_G(flags) |= PHPDBG_IS_CLEANING; in phpdbg_clean()
419 if ((res_len != PHPDBG_G(exec_len)) || (memcmp(res, PHPDBG_G(exec), res_len) != SUCCESS)) { in PHPDBG_COMMAND()
420 if (PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
426 if (PHPDBG_G(exec)) { in PHPDBG_COMMAND()
427 …ce("exec", "type=\"unset\" context=\"%s\"", "Unsetting old execution context: %s", PHPDBG_G(exec)); in PHPDBG_COMMAND()
428 efree(PHPDBG_G(exec)); in PHPDBG_COMMAND()
429 PHPDBG_G(exec) = NULL; in PHPDBG_COMMAND()
430 PHPDBG_G(exec_len) = 0L; in PHPDBG_COMMAND()
433 if (PHPDBG_G(ops)) { in PHPDBG_COMMAND()
438 PHPDBG_G(exec) = res; in PHPDBG_COMMAND()
439 PHPDBG_G(exec_len) = res_len; in PHPDBG_COMMAND()
443 *SG(request_info).argv = PHPDBG_G(exec); in PHPDBG_COMMAND()
446 … phpdbg_notice("exec", "type=\"set\" context=\"%s\"", "Set execution context: %s", PHPDBG_G(exec)); in PHPDBG_COMMAND()
448 if (PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
477 PHPDBG_G(input_buflen) += bytes; in PHPDBG_COMMAND()
478 if (PHPDBG_G(input_buflen) <= 0) { in PHPDBG_COMMAND()
483 char *nl = buf = PHPDBG_G(input_buffer); in PHPDBG_COMMAND()
487 smart_str_appendl(&code, PHPDBG_G(input_buffer), nl - PHPDBG_G(input_buffer)); in PHPDBG_COMMAND()
488 memmove(PHPDBG_G(input_buffer), ++buf, --PHPDBG_G(input_buflen)); in PHPDBG_COMMAND()
496 } while (--PHPDBG_G(input_buflen)); in PHPDBG_COMMAND()
498 smart_str_appendl(&code, PHPDBG_G(input_buffer), nl - PHPDBG_G(input_buffer)); in PHPDBG_COMMAND()
499 PHPDBG_G(input_buflen) = buf - nl; in PHPDBG_COMMAND()
500 memmove(PHPDBG_G(input_buffer), nl, PHPDBG_G(input_buflen)); in PHPDBG_COMMAND()
502 PHPDBG_G(input_buflen) = 0; in PHPDBG_COMMAND()
503 smart_str_appendl(&code, PHPDBG_G(input_buffer), buf - PHPDBG_G(input_buffer)); in PHPDBG_COMMAND()
506 smart_str_appendl(&code, PHPDBG_G(input_buffer), PHPDBG_G(input_buflen)); in PHPDBG_COMMAND()
507 PHPDBG_G(input_buflen) = 0; in PHPDBG_COMMAND()
509 …tes = phpdbg_mixed_read(PHPDBG_G(io)[PHPDBG_STDIN].fd, PHPDBG_G(input_buffer) + PHPDBG_G(input_buf… in PHPDBG_COMMAND()
512 PHPDBG_G(flags) |= PHPDBG_IS_QUITTING | PHPDBG_IS_DISCONNECTED; in PHPDBG_COMMAND()
532 PHPDBG_G(ops) = zend_compile_string(&zv, "-"); in phpdbg_compile_stdin()
540 if (PHPDBG_G(exec)) { in phpdbg_compile_stdin()
541 efree(PHPDBG_G(exec)); in phpdbg_compile_stdin()
543 PHPDBG_G(exec) = estrdup("-"); in phpdbg_compile_stdin()
544 PHPDBG_G(exec_len) = 1; in phpdbg_compile_stdin()
548 zend_string *source_path = strpprintf(0, "-%c%p", 0, PHPDBG_G(ops)->opcodes); in phpdbg_compile_stdin()
549 phpdbg_file_source *data = zend_hash_find_ptr(&PHPDBG_G(file_sources), source_path); in phpdbg_compile_stdin()
550 dtor_func_t dtor = PHPDBG_G(file_sources).pDestructor; in phpdbg_compile_stdin()
551 PHPDBG_G(file_sources).pDestructor = NULL; in phpdbg_compile_stdin()
552 zend_hash_del(&PHPDBG_G(file_sources), source_path); in phpdbg_compile_stdin()
553 PHPDBG_G(file_sources).pDestructor = dtor; in phpdbg_compile_stdin()
554 zend_hash_str_update_ptr(&PHPDBG_G(file_sources), "-", 1, data); in phpdbg_compile_stdin()
578 if (!PHPDBG_G(exec)) { in phpdbg_compile()
583 …if (php_stream_open_for_zend_ex(PHPDBG_G(exec), &fh, USE_PATH|STREAM_OPEN_FOR_INCLUDE) == SUCCESS … in phpdbg_compile()
604 PHPDBG_G(ops) = zend_compile_file(&fh, ZEND_INCLUDE); in phpdbg_compile()
608 phpdbg_file_source *data = zend_hash_find_ptr(&PHPDBG_G(file_sources), PHPDBG_G(ops)->filename); in phpdbg_compile()
610 dtor_func_t dtor = PHPDBG_G(file_sources).pDestructor; in phpdbg_compile()
611 PHPDBG_G(file_sources).pDestructor = NULL; in phpdbg_compile()
612 zend_hash_del(&PHPDBG_G(file_sources), PHPDBG_G(ops)->filename); in phpdbg_compile()
613 PHPDBG_G(file_sources).pDestructor = dtor; in phpdbg_compile()
626 zend_hash_update_ptr(&PHPDBG_G(file_sources), PHPDBG_G(ops)->filename, data); in phpdbg_compile()
637 phpdbg_notice("compile", "context=\"%s\"", "Successful compilation of %s", PHPDBG_G(exec)); in phpdbg_compile()
641 …phpdbg_error("compile", "type=\"openfailure\" context=\"%s\"", "Could not open file %s", PHPDBG_G(… in phpdbg_compile()
649 if (PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
650 PHPDBG_G(flags) |= PHPDBG_IS_STEPPING; in PHPDBG_COMMAND()
666 PHPDBG_G(flags) |= PHPDBG_IN_UNTIL; in phpdbg_skip_line_helper()
667 PHPDBG_G(seek_ex) = ex; in phpdbg_skip_line_helper()
677 zend_hash_index_update_ptr(&PHPDBG_G(seek), (zend_ulong) opline, (void *) opline); in phpdbg_skip_line_helper()
687 if (!PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
697 if (!PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
702 PHPDBG_G(flags) |= PHPDBG_IS_STEPPING; in PHPDBG_COMMAND()
711 PHPDBG_G(seek_ex) = ex; in phpdbg_seek_to_end()
720 zend_hash_index_update_ptr(&PHPDBG_G(seek), (zend_ulong) opline, (void *) opline); in phpdbg_seek_to_end()
728 if (!PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
734 …if (zend_hash_index_exists(&PHPDBG_G(seek), (zend_ulong) phpdbg_user_execute_data(EG(current_execu… in PHPDBG_COMMAND()
735 zend_hash_clean(&PHPDBG_G(seek)); in PHPDBG_COMMAND()
737 PHPDBG_G(flags) |= PHPDBG_IN_FINISH; in PHPDBG_COMMAND()
745 if (!PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
751 …if (zend_hash_index_exists(&PHPDBG_G(seek), (zend_ulong) phpdbg_user_execute_data(EG(current_execu… in PHPDBG_COMMAND()
752 zend_hash_clean(&PHPDBG_G(seek)); in PHPDBG_COMMAND()
756 PHPDBG_G(flags) |= PHPDBG_IN_LEAVE; in PHPDBG_COMMAND()
764 phpdbg_notice("frame", "id=\"%d\"", "Currently in frame #%d", PHPDBG_G(frame).num); in PHPDBG_COMMAND()
812 if (PHPDBG_G(ops) || PHPDBG_G(exec)) { in PHPDBG_COMMAND()
816 if (PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
824 if (!PHPDBG_G(ops)) { in PHPDBG_COMMAND()
826 …le", "type=\"compilefailure\" context=\"%s\"", "Failed to compile %s, cannot run", PHPDBG_G(exec)); in PHPDBG_COMMAND()
867 PHPDBG_G(stdin_file) = fopen(buf, "r"); in PHPDBG_COMMAND()
868 if (PHPDBG_G(stdin_file) == NULL) { in PHPDBG_COMMAND()
928 PHPDBG_G(handled_exception) = NULL; in PHPDBG_COMMAND()
931 PHPDBG_G(flags) &= ~PHPDBG_SEEK_MASK; in PHPDBG_COMMAND()
932 zend_hash_clean(&PHPDBG_G(seek)); in PHPDBG_COMMAND()
938 PHPDBG_G(flags) ^= PHPDBG_IS_INTERACTIVE; in PHPDBG_COMMAND()
939 PHPDBG_G(flags) |= PHPDBG_IS_RUNNING; in PHPDBG_COMMAND()
940 zend_execute(PHPDBG_G(ops), &PHPDBG_G(retval)); in PHPDBG_COMMAND()
941 PHPDBG_G(flags) ^= PHPDBG_IS_INTERACTIVE; in PHPDBG_COMMAND()
943 PHPDBG_G(in_execution) = 0; in PHPDBG_COMMAND()
945 if (!(PHPDBG_G(flags) & PHPDBG_IS_STOPPING)) { in PHPDBG_COMMAND()
952 if (PHPDBG_G(socket_fd) != -1) { in PHPDBG_COMMAND()
953 close(PHPDBG_G(socket_fd)); in PHPDBG_COMMAND()
954 PHPDBG_G(socket_fd) = -1; in PHPDBG_COMMAND()
961 PHPDBG_G(in_execution) = 1; in PHPDBG_COMMAND()
963 PHPDBG_G(in_execution) = 0; in PHPDBG_COMMAND()
965 if (PHPDBG_G(flags) & PHPDBG_IS_STOPPING) { in PHPDBG_COMMAND()
975 PHPDBG_G(flags) &= ~PHPDBG_IS_RUNNING; in PHPDBG_COMMAND()
1003 zend_bool stepping = ((PHPDBG_G(flags) & PHPDBG_IS_STEPPING) == PHPDBG_IS_STEPPING); in PHPDBG_COMMAND()
1015 if (PHPDBG_G(flags) & PHPDBG_IN_SIGNAL_HANDLER) { in PHPDBG_COMMAND()
1026 if (!(PHPDBG_G(flags) & PHPDBG_IS_STEPONEVAL)) { in PHPDBG_COMMAND()
1027 PHPDBG_G(flags) &= ~PHPDBG_IS_STEPPING; in PHPDBG_COMMAND()
1031 PHPDBG_G(flags) |= PHPDBG_IN_EVAL; in PHPDBG_COMMAND()
1039 if (PHPDBG_G(flags) & PHPDBG_WRITE_XML) { in PHPDBG_COMMAND()
1050 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()
1122 …phpdbg_writeln("info", "context=\"%s\"", "Exec %s", PHPDBG_G(exec) ? PHPDBG_G(exec) : "none"… in PHPDBG_COMMAND()
1123 phpdbg_writeln("info", "compiled=\"%s\"", "Compiled %s", PHPDBG_G(ops) ? "yes" : "no"); in PHPDBG_COMMAND()
1124 …phpdbg_writeln("info", "stepping=\"%s\"", "Stepping %s", (PHPDBG_G(flags) & PHPDBG_IS_STEPPING) … in PHPDBG_COMMAND()
1125 …phpdbg_writeln("info", "quiet=\"%s\"", "Quietness %s", (PHPDBG_G(flags) & PHPDBG_IS_QUIET) ? "on"… in PHPDBG_COMMAND()
1126 phpdbg_writeln("info", "oplog=\"%s\"", "Oplog %s", PHPDBG_G(oplog) ? "on" : "off"); in PHPDBG_COMMAND()
1128 if (PHPDBG_G(ops)) { in PHPDBG_COMMAND()
1129 phpdbg_writeln("info", "ops=\"%d\"", "Opcodes %d", PHPDBG_G(ops)->last); in PHPDBG_COMMAND()
1130 …phpdbg_writeln("info", "vars=\"%d\"", "Variables %d", PHPDBG_G(ops)->last_var ? PHPDBG_G(ops)->la… in PHPDBG_COMMAND()
1133 phpdbg_writeln("info", "executing=\"%d\"", "Executing %s", PHPDBG_G(in_execution) ? "yes" : "no"); in PHPDBG_COMMAND()
1134 if (PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
1135 phpdbg_writeln("info", "vmret=\"%d\"", "VM Return %d", PHPDBG_G(vmret)); in PHPDBG_COMMAND()
1157 if (PHPDBG_G(exec)) { in PHPDBG_COMMAND()
1170 if (PHPDBG_G(exec)) { in PHPDBG_COMMAND()
1445 if (!zend_hash_str_exists(&PHPDBG_G(registered), lcname, lcname_len)) { in PHPDBG_COMMAND()
1447 zend_hash_str_update_ptr(&PHPDBG_G(registered), lcname, lcname_len, function); in PHPDBG_COMMAND()
1464 PHPDBG_G(flags) |= PHPDBG_IS_QUITTING; in PHPDBG_COMMAND()
1465 PHPDBG_G(flags) &= ~PHPDBG_IS_CLEANING; in PHPDBG_COMMAND()
1472 if (PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
1498 …phpdbg_writeln("clear", "files=\"%d\"", "File %d", zend_hash_num_elements(&PHPDBG_G(b… in PHPDBG_COMMAND()
1499 …r", "functions=\"%d\"", "Functions %d", zend_hash_num_elements(&PHPDBG_G(bp)[PHPDBG_BREAK_… in PHPDBG_COMMAND()
1500 …phpdbg_writeln("clear", "methods=\"%d\"", "Methods %d", zend_hash_num_elements(&PHPDBG_G in PHPDBG_COMMAND()
1501 …phpdbg_writeln("clear", "oplines=\"%d\"", "Oplines %d", zend_hash_num_elements(&PHPDBG_G in PHPDBG_COMMAND()
1502 …, "fileoplines=\"%d\"", "File oplines %d", zend_hash_num_elements(&PHPDBG_G(bp)[PHPDBG_BREAK_… in PHPDBG_COMMAND()
1503 …unctionoplines=\"%d\"", "Function oplines %d", zend_hash_num_elements(&PHPDBG_G(bp)[PHPDBG_BREAK_… in PHPDBG_COMMAND()
1504 …"methodoplines=\"%d\"", "Method oplines %d", zend_hash_num_elements(&PHPDBG_G(bp)[PHPDBG_BREAK_… in PHPDBG_COMMAND()
1505 …phpdbg_writeln("clear", "eval=\"%d\"", "Conditionals %d", zend_hash_num_elements(&PHPDBG_G(bp… in PHPDBG_COMMAND()
1560 PHPDBG_G(flags) |= PHPDBG_IS_INTERACTIVE; in phpdbg_interactive()
1563 if (PHPDBG_G(flags) & PHPDBG_IS_STOPPING) { in phpdbg_interactive()
1579 if (PHPDBG_G(flags) & PHPDBG_IS_REMOTE && (RUN_PARAM == PARA || EVAL_PARAM == PARA)) { in phpdbg_interactive()
1585 if (!(PHPDBG_G(flags) & PHPDBG_IS_STOPPING)) { in phpdbg_interactive()
1598 if (!PHPDBG_G(in_execution) && !(PHPDBG_G(flags) & PHPDBG_IS_STOPPING)) { in phpdbg_interactive()
1608 if (PHPDBG_G(flags) & PHPDBG_IS_REMOTE && (RUN_PARAM == PARA || EVAL_PARAM == PARA)) { in phpdbg_interactive()
1617 PHPDBG_G(req_id) = 0; in phpdbg_interactive()
1624 PHPDBG_G(req_id) = 0; in phpdbg_interactive()
1627 if (PHPDBG_G(in_execution)) { in phpdbg_interactive()
1631 PHPDBG_G(flags) &= ~PHPDBG_IS_INTERACTIVE; in phpdbg_interactive()
1650 if (!(PHPDBG_G(flags) & PHPDBG_IN_EVAL)) { \
1682 zend_bool original_in_execution = PHPDBG_G(in_execution); in phpdbg_execute_ex()
1684 if ((PHPDBG_G(flags) & PHPDBG_IS_STOPPING) && !(PHPDBG_G(flags) & PHPDBG_IS_RUNNING)) { in phpdbg_execute_ex()
1688 PHPDBG_G(in_execution) = 1; in phpdbg_execute_ex()
1693 if ((PHPDBG_G(flags) & PHPDBG_BP_RESOLVE_MASK)) { in phpdbg_execute_ex()
1704 if (PHPDBG_G(flags) & PHPDBG_PREVENT_INTERACTIVE) { in phpdbg_execute_ex()
1710 …if (exception && PHPDBG_G(handled_exception) != exception && !(PHPDBG_G(flags) & PHPDBG_IN_EVAL)) { in phpdbg_execute_ex()
1728 PHPDBG_G(handled_exception) = exception; in phpdbg_execute_ex()
1748 if (PHPDBG_G(flags) & (PHPDBG_IN_COND_BP | PHPDBG_IS_INITIALIZING)) { in phpdbg_execute_ex()
1757 if ((PHPDBG_G(flags) & PHPDBG_SEEK_MASK) && !(PHPDBG_G(flags) & PHPDBG_IN_EVAL)) { in phpdbg_execute_ex()
1761 if (PHPDBG_G(seek_ex) != execute_data) { in phpdbg_execute_ex()
1762 if (PHPDBG_G(flags) & PHPDBG_IS_STEPPING) { in phpdbg_execute_ex()
1768 #define INDEX_EXISTS_CHECK (zend_hash_index_exists(&PHPDBG_G(seek), address) || (exception && phpdb… in phpdbg_execute_ex()
1771 if (PHPDBG_G(flags) & PHPDBG_IN_UNTIL) { in phpdbg_execute_ex()
1773 PHPDBG_G(flags) &= ~PHPDBG_IN_UNTIL; in phpdbg_execute_ex()
1774 zend_hash_clean(&PHPDBG_G(seek)); in phpdbg_execute_ex()
1782 if (PHPDBG_G(flags) & PHPDBG_IN_FINISH) { in phpdbg_execute_ex()
1784 PHPDBG_G(flags) &= ~PHPDBG_IN_FINISH; in phpdbg_execute_ex()
1785 zend_hash_clean(&PHPDBG_G(seek)); in phpdbg_execute_ex()
1792 if (PHPDBG_G(flags) & PHPDBG_IN_LEAVE) { in phpdbg_execute_ex()
1794 PHPDBG_G(flags) &= ~PHPDBG_IN_LEAVE; in phpdbg_execute_ex()
1795 zend_hash_clean(&PHPDBG_G(seek)); in phpdbg_execute_ex()
1808 …if (PHPDBG_G(flags) & PHPDBG_IS_STEPPING && (PHPDBG_G(flags) & PHPDBG_STEP_OPCODE || execute_data-… in phpdbg_execute_ex()
1810 PHPDBG_G(flags) &= ~PHPDBG_IS_STEPPING; in phpdbg_execute_ex()
1825 if ((PHPDBG_G(flags) & PHPDBG_BP_MASK) in phpdbg_execute_ex()
1827 … && (brake->type != PHPDBG_BREAK_FILE || execute_data->opline->lineno != PHPDBG_G(last_line))) { in phpdbg_execute_ex()
1833 if (PHPDBG_G(flags) & PHPDBG_IS_SIGNALED) { in phpdbg_execute_ex()
1834 PHPDBG_G(flags) &= ~PHPDBG_IS_SIGNALED; in phpdbg_execute_ex()
1843 PHPDBG_G(last_line) = execute_data->opline->lineno; in phpdbg_execute_ex()
1852 PHPDBG_G(vmret) = zend_vm_call_opcode_handler(execute_data); in phpdbg_execute_ex()
1855 if (PHPDBG_G(vmret) != 0) { in phpdbg_execute_ex()
1856 if (PHPDBG_G(vmret) < 0) { in phpdbg_execute_ex()
1857 PHPDBG_G(in_execution) = original_in_execution; in phpdbg_execute_ex()
1872 PHPDBG_G(flags) |= PHPDBG_IN_SIGNAL_HANDLER; in phpdbg_force_interruption()
1893 PHPDBG_G(flags) &= ~PHPDBG_IN_SIGNAL_HANDLER; in phpdbg_force_interruption()
1895 if (PHPDBG_G(flags) & PHPDBG_IS_STOPPING) { in phpdbg_force_interruption()