Lines Matching refs:PHPDBG_G

109 		if (zend_hash_str_exists(&PHPDBG_G(registered), lc_name, name->len)) {  in phpdbg_call_register()
268 …ecognized command in %s:%d: %s, %s!", state->init_file, state->line, input, PHPDBG_G(err_buf).msg); in phpdbg_line_init()
270 …put_err_buf("Unrecognized command on line %d: %s, %s!", state->line, input, PHPDBG_G(err_buf).msg); in phpdbg_line_init()
283 PHPDBG_G(flags) &= ~(PHPDBG_IS_RUNNING | PHPDBG_IS_CLEANING); in phpdbg_line_init()
284 if (PHPDBG_G(flags) & PHPDBG_IS_QUITTING) { in phpdbg_line_init()
383 if (PHPDBG_G(ops)) { in phpdbg_clean()
384 destroy_op_array(PHPDBG_G(ops)); in phpdbg_clean()
385 efree(PHPDBG_G(ops)); in phpdbg_clean()
386 PHPDBG_G(ops) = NULL; in phpdbg_clean()
389 if (!resubmit && PHPDBG_G(cur_command)) { in phpdbg_clean()
390 free(PHPDBG_G(cur_command)); in phpdbg_clean()
391 PHPDBG_G(cur_command) = NULL; in phpdbg_clean()
395 PHPDBG_G(flags) |= PHPDBG_IS_CLEANING; in phpdbg_clean()
408 if ((res_len != PHPDBG_G(exec_len)) || (memcmp(res, PHPDBG_G(exec), res_len) != SUCCESS)) { in PHPDBG_COMMAND()
409 if (PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
416 if (PHPDBG_G(exec)) { in PHPDBG_COMMAND()
417 phpdbg_notice("Unsetting old execution context: %s", PHPDBG_G(exec)); in PHPDBG_COMMAND()
418 free(PHPDBG_G(exec)); in PHPDBG_COMMAND()
419 PHPDBG_G(exec) = NULL; in PHPDBG_COMMAND()
420 PHPDBG_G(exec_len) = 0L; in PHPDBG_COMMAND()
423 if (PHPDBG_G(ops)) { in PHPDBG_COMMAND()
428 PHPDBG_G(exec) = res; in PHPDBG_COMMAND()
429 PHPDBG_G(exec_len) = res_len; in PHPDBG_COMMAND()
433 *SG(request_info).argv = estrndup(PHPDBG_G(exec), PHPDBG_G(exec_len)); in PHPDBG_COMMAND()
436 phpdbg_notice("Set execution context: %s", PHPDBG_G(exec)); in PHPDBG_COMMAND()
438 if (PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
468 PHPDBG_G(input_buflen) += bytes; in PHPDBG_COMMAND()
469 if (PHPDBG_G(input_buflen) <= 0) { in PHPDBG_COMMAND()
474 char *nl = buf = PHPDBG_G(input_buffer); in PHPDBG_COMMAND()
478 smart_str_appendl(&code, PHPDBG_G(input_buffer), nl - PHPDBG_G(input_buffer)); in PHPDBG_COMMAND()
479 memmove(PHPDBG_G(input_buffer), ++buf, --PHPDBG_G(input_buflen)); in PHPDBG_COMMAND()
487 } while (--PHPDBG_G(input_buflen)); in PHPDBG_COMMAND()
489 smart_str_appendl(&code, PHPDBG_G(input_buffer), nl - PHPDBG_G(input_buffer)); in PHPDBG_COMMAND()
490 PHPDBG_G(input_buflen) = buf - nl; in PHPDBG_COMMAND()
491 memmove(PHPDBG_G(input_buffer), nl, PHPDBG_G(input_buflen)); in PHPDBG_COMMAND()
493 PHPDBG_G(input_buflen) = 0; in PHPDBG_COMMAND()
494 smart_str_appendl(&code, PHPDBG_G(input_buffer), buf - PHPDBG_G(input_buffer)); in PHPDBG_COMMAND()
497 smart_str_appendl(&code, PHPDBG_G(input_buffer), PHPDBG_G(input_buflen)); in PHPDBG_COMMAND()
498 PHPDBG_G(input_buflen) = 0; in PHPDBG_COMMAND()
500 …tes = phpdbg_mixed_read(PHPDBG_G(io)[PHPDBG_STDIN].fd, PHPDBG_G(input_buffer) + PHPDBG_G(input_buf… in PHPDBG_COMMAND()
503 PHPDBG_G(flags) |= PHPDBG_IS_QUITTING; in PHPDBG_COMMAND()
519 PHPDBG_G(ops) = zend_compile_string(code, "Standard input code"); in phpdbg_compile_stdin()
526 if (PHPDBG_G(exec)) { in phpdbg_compile_stdin()
527 free(PHPDBG_G(exec)); in phpdbg_compile_stdin()
529 PHPDBG_G(exec) = strdup("Standard input code"); in phpdbg_compile_stdin()
530 PHPDBG_G(exec_len) = sizeof("Standard input code") - 1; in phpdbg_compile_stdin()
534 zend_string *source_path = strpprintf(0, "Standard input code%c%p", 0, PHPDBG_G(ops)->opcodes); in phpdbg_compile_stdin()
535 phpdbg_file_source *data = zend_hash_find_ptr(&PHPDBG_G(file_sources), source_path); in phpdbg_compile_stdin()
536 dtor_func_t dtor = PHPDBG_G(file_sources).pDestructor; in phpdbg_compile_stdin()
537 PHPDBG_G(file_sources).pDestructor = NULL; in phpdbg_compile_stdin()
538 zend_hash_del(&PHPDBG_G(file_sources), source_path); in phpdbg_compile_stdin()
539 PHPDBG_G(file_sources).pDestructor = dtor; in phpdbg_compile_stdin()
540 …zend_hash_str_update_ptr(&PHPDBG_G(file_sources), "Standard input code", sizeof("Standard input co… in phpdbg_compile_stdin()
561 if (!PHPDBG_G(exec)) { in phpdbg_compile()
566 zend_stream_init_filename(&fh, PHPDBG_G(exec)); in phpdbg_compile()
569 PHPDBG_G(ops) = zend_compile_file(&fh, ZEND_INCLUDE); in phpdbg_compile()
576 phpdbg_notice("Successful compilation of %s", PHPDBG_G(exec)); in phpdbg_compile()
580 phpdbg_error("Could not open file %s", PHPDBG_G(exec)); in phpdbg_compile()
588 if (PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
589 PHPDBG_G(flags) |= PHPDBG_IS_STEPPING; in PHPDBG_COMMAND()
605 PHPDBG_G(flags) |= PHPDBG_IN_UNTIL; in phpdbg_skip_line_helper()
606 PHPDBG_G(seek_ex) = ex; in phpdbg_skip_line_helper()
616 zend_hash_index_update_ptr(&PHPDBG_G(seek), (zend_ulong) opline, (void *) opline); in phpdbg_skip_line_helper()
626 if (!PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
636 if (!PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
641 PHPDBG_G(flags) |= PHPDBG_IS_STEPPING; in PHPDBG_COMMAND()
650 PHPDBG_G(seek_ex) = ex; in phpdbg_seek_to_end()
659 zend_hash_index_update_ptr(&PHPDBG_G(seek), (zend_ulong) opline, (void *) opline); in phpdbg_seek_to_end()
667 if (!PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
673 …if (zend_hash_index_exists(&PHPDBG_G(seek), (zend_ulong) phpdbg_user_execute_data(EG(current_execu… in PHPDBG_COMMAND()
674 zend_hash_clean(&PHPDBG_G(seek)); in PHPDBG_COMMAND()
676 PHPDBG_G(flags) |= PHPDBG_IN_FINISH; in PHPDBG_COMMAND()
684 if (!PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
690 …if (zend_hash_index_exists(&PHPDBG_G(seek), (zend_ulong) phpdbg_user_execute_data(EG(current_execu… in PHPDBG_COMMAND()
691 zend_hash_clean(&PHPDBG_G(seek)); in PHPDBG_COMMAND()
695 PHPDBG_G(flags) |= PHPDBG_IN_LEAVE; in PHPDBG_COMMAND()
703 phpdbg_notice("Currently in frame #%d", PHPDBG_G(frame).num); in PHPDBG_COMMAND()
750 if (PHPDBG_G(ops) || PHPDBG_G(exec)) { in PHPDBG_COMMAND()
754 if (PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
762 if (!PHPDBG_G(ops)) { in PHPDBG_COMMAND()
764 phpdbg_error("Failed to compile %s, cannot run", PHPDBG_G(exec)); in PHPDBG_COMMAND()
809 PHPDBG_G(stdin_file) = fopen(buf, "r"); in PHPDBG_COMMAND()
810 if (PHPDBG_G(stdin_file) == NULL) { in PHPDBG_COMMAND()
873 PHPDBG_G(handled_exception) = NULL; in PHPDBG_COMMAND()
876 PHPDBG_G(flags) &= ~PHPDBG_SEEK_MASK; in PHPDBG_COMMAND()
877 zend_hash_clean(&PHPDBG_G(seek)); in PHPDBG_COMMAND()
883 PHPDBG_G(flags) ^= PHPDBG_IS_INTERACTIVE; in PHPDBG_COMMAND()
884 PHPDBG_G(flags) |= PHPDBG_IS_RUNNING; in PHPDBG_COMMAND()
885 zend_execute(PHPDBG_G(ops), &PHPDBG_G(retval)); in PHPDBG_COMMAND()
886 PHPDBG_G(flags) ^= PHPDBG_IS_INTERACTIVE; in PHPDBG_COMMAND()
888 PHPDBG_G(in_execution) = 0; in PHPDBG_COMMAND()
890 if (!(PHPDBG_G(flags) & PHPDBG_IS_STOPPING)) { in PHPDBG_COMMAND()
901 PHPDBG_G(in_execution) = 1; in PHPDBG_COMMAND()
903 PHPDBG_G(in_execution) = 0; in PHPDBG_COMMAND()
905 if (PHPDBG_G(flags) & PHPDBG_IS_STOPPING) { in PHPDBG_COMMAND()
915 PHPDBG_G(flags) &= ~PHPDBG_IS_RUNNING; in PHPDBG_COMMAND()
943 bool stepping = ((PHPDBG_G(flags) & PHPDBG_IS_STEPPING) == PHPDBG_IS_STEPPING); in PHPDBG_COMMAND()
954 if (PHPDBG_G(flags) & PHPDBG_IN_SIGNAL_HANDLER) { in PHPDBG_COMMAND()
965 if (!(PHPDBG_G(flags) & PHPDBG_IS_STEPONEVAL)) { in PHPDBG_COMMAND()
966 PHPDBG_G(flags) &= ~PHPDBG_IS_STEPPING; in PHPDBG_COMMAND()
970 PHPDBG_G(flags) |= PHPDBG_IN_EVAL; in PHPDBG_COMMAND()
983 PHPDBG_G(unclean_eval) = 1; in PHPDBG_COMMAND()
994 PHPDBG_G(flags) &= ~PHPDBG_IN_EVAL; in PHPDBG_COMMAND()
997 if (stepping && !(PHPDBG_G(flags) & PHPDBG_IS_STEPONEVAL)) { in PHPDBG_COMMAND()
998 PHPDBG_G(flags) |= PHPDBG_IS_STEPPING; in PHPDBG_COMMAND()
1010 if (!PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
1028 if (!PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
1107 phpdbg_writeln("Exec %s", PHPDBG_G(exec) ? PHPDBG_G(exec) : "none"); in PHPDBG_COMMAND()
1108 phpdbg_writeln("Compiled %s", PHPDBG_G(ops) ? "yes" : "no"); in PHPDBG_COMMAND()
1109 phpdbg_writeln("Stepping %s", (PHPDBG_G(flags) & PHPDBG_IS_STEPPING) ? "on" : "off"); in PHPDBG_COMMAND()
1110 phpdbg_writeln("Quietness %s", (PHPDBG_G(flags) & PHPDBG_IS_QUIET) ? "on" : "off"); in PHPDBG_COMMAND()
1112 if (PHPDBG_G(ops)) { in PHPDBG_COMMAND()
1113 phpdbg_writeln("Opcodes %d", PHPDBG_G(ops)->last); in PHPDBG_COMMAND()
1114 phpdbg_writeln("Variables %d", PHPDBG_G(ops)->last_var ? PHPDBG_G(ops)->last_var - 1 : 0); in PHPDBG_COMMAND()
1117 phpdbg_writeln("Executing %s", PHPDBG_G(in_execution) ? "yes" : "no"); in PHPDBG_COMMAND()
1118 if (PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
1119 phpdbg_writeln("VM Return %d", PHPDBG_G(vmret)); in PHPDBG_COMMAND()
1140 if (PHPDBG_G(exec)) { in PHPDBG_COMMAND()
1153 if (PHPDBG_G(exec)) { in PHPDBG_COMMAND()
1375 …Could not load %s, not found or invalid zend extension / module: %s", path, PHPDBG_G(err_buf).msg); in PHPDBG_COMMAND()
1426 if (!zend_hash_str_exists(&PHPDBG_G(registered), lcname, lcname_len)) { in PHPDBG_COMMAND()
1428 zend_hash_str_update_ptr(&PHPDBG_G(registered), lcname, lcname_len, function); in PHPDBG_COMMAND()
1445 PHPDBG_G(flags) |= PHPDBG_IS_QUITTING; in PHPDBG_COMMAND()
1446 PHPDBG_G(flags) &= ~PHPDBG_IS_CLEANING; in PHPDBG_COMMAND()
1453 if (PHPDBG_G(in_execution)) { in PHPDBG_COMMAND()
1475 phpdbg_writeln("File %d", zend_hash_num_elements(&PHPDBG_G(bp)[PHPDBG_BREAK_FILE])); in PHPDBG_COMMAND()
1476 phpdbg_writeln("Functions %d", zend_hash_num_elements(&PHPDBG_G(bp)[PHPDBG_BREAK_SYM])); in PHPDBG_COMMAND()
1477 phpdbg_writeln("Methods %d", zend_hash_num_elements(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD])); in PHPDBG_COMMAND()
1478 phpdbg_writeln("Oplines %d", zend_hash_num_elements(&PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE])); in PHPDBG_COMMAND()
1479 …phpdbg_writeln("File oplines %d", zend_hash_num_elements(&PHPDBG_G(bp)[PHPDBG_BREAK_FILE_OPLI… in PHPDBG_COMMAND()
1480 …phpdbg_writeln("Function oplines %d", zend_hash_num_elements(&PHPDBG_G(bp)[PHPDBG_BREAK_FUNCTION_… in PHPDBG_COMMAND()
1481 …phpdbg_writeln("Method oplines %d", zend_hash_num_elements(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD_OP… in PHPDBG_COMMAND()
1482 phpdbg_writeln("Conditionals %d", zend_hash_num_elements(&PHPDBG_G(bp)[PHPDBG_BREAK_COND])); in PHPDBG_COMMAND()
1533 PHPDBG_G(flags) |= PHPDBG_IS_INTERACTIVE; in phpdbg_interactive()
1536 if (PHPDBG_G(flags) & PHPDBG_IS_STOPPING) { in phpdbg_interactive()
1559 if (!(PHPDBG_G(flags) & PHPDBG_IS_STOPPING)) { in phpdbg_interactive()
1561 if (PHPDBG_G(err_buf).active) { in phpdbg_interactive()
1562 phpdbg_output_err_buf("%s", PHPDBG_G(err_buf).msg); in phpdbg_interactive()
1574 if (!PHPDBG_G(in_execution) && !(PHPDBG_G(flags) & PHPDBG_IS_STOPPING)) { in phpdbg_interactive()
1587 PHPDBG_G(req_id) = 0; in phpdbg_interactive()
1594 PHPDBG_G(req_id) = 0; in phpdbg_interactive()
1597 if (PHPDBG_G(in_execution)) { in phpdbg_interactive()
1601 PHPDBG_G(flags) &= ~PHPDBG_IS_INTERACTIVE; in phpdbg_interactive()
1609 if (!(PHPDBG_G(flags) & PHPDBG_IN_EVAL)) { in list_code()
1651 bool original_in_execution = PHPDBG_G(in_execution); in phpdbg_execute_ex()
1653 if ((PHPDBG_G(flags) & PHPDBG_IS_STOPPING) && !(PHPDBG_G(flags) & PHPDBG_IS_RUNNING)) { in phpdbg_execute_ex()
1657 PHPDBG_G(in_execution) = 1; in phpdbg_execute_ex()
1662 if ((PHPDBG_G(flags) & PHPDBG_BP_RESOLVE_MASK)) { in phpdbg_execute_ex()
1678 if (PHPDBG_G(flags) & PHPDBG_PREVENT_INTERACTIVE) { in phpdbg_execute_ex()
1684 …if (exception && PHPDBG_G(handled_exception) != exception && !(PHPDBG_G(flags) & PHPDBG_IN_EVAL)) { in phpdbg_execute_ex()
1699 PHPDBG_G(handled_exception) = exception; in phpdbg_execute_ex()
1717 if (PHPDBG_G(flags) & (PHPDBG_IN_COND_BP | PHPDBG_IS_INITIALIZING)) { in phpdbg_execute_ex()
1726 if ((PHPDBG_G(flags) & PHPDBG_SEEK_MASK) && !(PHPDBG_G(flags) & PHPDBG_IN_EVAL)) { in phpdbg_execute_ex()
1730 if (PHPDBG_G(seek_ex) != execute_data) { in phpdbg_execute_ex()
1731 if (PHPDBG_G(flags) & PHPDBG_IS_STEPPING) { in phpdbg_execute_ex()
1737 #define INDEX_EXISTS_CHECK (zend_hash_index_exists(&PHPDBG_G(seek), address) || (exception && phpdb… in phpdbg_execute_ex()
1740 if (PHPDBG_G(flags) & PHPDBG_IN_UNTIL) { in phpdbg_execute_ex()
1742 PHPDBG_G(flags) &= ~PHPDBG_IN_UNTIL; in phpdbg_execute_ex()
1743 zend_hash_clean(&PHPDBG_G(seek)); in phpdbg_execute_ex()
1751 if (PHPDBG_G(flags) & PHPDBG_IN_FINISH) { in phpdbg_execute_ex()
1753 PHPDBG_G(flags) &= ~PHPDBG_IN_FINISH; in phpdbg_execute_ex()
1754 zend_hash_clean(&PHPDBG_G(seek)); in phpdbg_execute_ex()
1761 if (PHPDBG_G(flags) & PHPDBG_IN_LEAVE) { in phpdbg_execute_ex()
1763 PHPDBG_G(flags) &= ~PHPDBG_IN_LEAVE; in phpdbg_execute_ex()
1764 zend_hash_clean(&PHPDBG_G(seek)); in phpdbg_execute_ex()
1777 …if (PHPDBG_G(flags) & PHPDBG_IS_STEPPING && (PHPDBG_G(flags) & PHPDBG_STEP_OPCODE || execute_data-… in phpdbg_execute_ex()
1779 PHPDBG_G(flags) &= ~PHPDBG_IS_STEPPING; in phpdbg_execute_ex()
1794 if ((PHPDBG_G(flags) & PHPDBG_BP_MASK) in phpdbg_execute_ex()
1796 … && (brake->type != PHPDBG_BREAK_FILE || execute_data->opline->lineno != PHPDBG_G(last_line))) { in phpdbg_execute_ex()
1802 if (PHPDBG_G(flags) & PHPDBG_IS_SIGNALED) { in phpdbg_execute_ex()
1803 PHPDBG_G(flags) &= ~PHPDBG_IS_SIGNALED; in phpdbg_execute_ex()
1812 PHPDBG_G(last_line) = execute_data->opline->lineno; in phpdbg_execute_ex()
1821 PHPDBG_G(vmret) = zend_vm_call_opcode_handler(execute_data); in phpdbg_execute_ex()
1824 if (PHPDBG_G(vmret) != 0) { in phpdbg_execute_ex()
1825 if (PHPDBG_G(vmret) < 0) { in phpdbg_execute_ex()
1826 PHPDBG_G(in_execution) = original_in_execution; in phpdbg_execute_ex()
1841 PHPDBG_G(flags) |= PHPDBG_IN_SIGNAL_HANDLER; in phpdbg_force_interruption()
1868 PHPDBG_G(flags) &= ~PHPDBG_IN_SIGNAL_HANDLER; in phpdbg_force_interruption()
1870 if (PHPDBG_G(flags) & PHPDBG_IS_STOPPING) { in phpdbg_force_interruption()