@@ -110,6 +110,11 @@ static PHPDBG_COMMAND(next) /* {{{ */
110110
111111static PHPDBG_COMMAND (run ) /* {{{ */
112112{
113+ if (EG (in_execution )) {
114+ printf ("[Cannot start another execution while on is in progress]\n" );
115+ return FAILURE ;
116+ }
117+
113118 if (PHPDBG_G (ops ) || PHPDBG_G (exec )) {
114119 if (!PHPDBG_G (ops )) {
115120 if (phpdbg_compile (TSRMLS_C ) == FAILURE ) {
@@ -528,7 +533,9 @@ void phpdbg_execute_ex(zend_execute_data *execute_data TSRMLS_DC) /* {{{ */
528533 if (PHPDBG_G (has_file_bp )
529534 && phpdbg_find_breakpoint_file (execute_data -> op_array TSRMLS_CC ) == SUCCESS ) {
530535 while (phpdbg_interactive (TSRMLS_C ) != PHPDBG_NEXT ) {
531- continue ;
536+ if (!PHPDBG_G (quitting )) {
537+ continue ;
538+ }
532539 }
533540 }
534541
@@ -540,7 +547,9 @@ void phpdbg_execute_ex(zend_execute_data *execute_data TSRMLS_DC) /* {{{ */
540547 if (phpdbg_find_breakpoint_symbol (
541548 previous -> function_state .function TSRMLS_CC ) == SUCCESS ) {
542549 while (phpdbg_interactive (TSRMLS_C ) != PHPDBG_NEXT ) {
543- continue ;
550+ if (!PHPDBG_G (quitting )) {
551+ continue ;
552+ }
544553 }
545554 }
546555 }
@@ -550,18 +559,22 @@ void phpdbg_execute_ex(zend_execute_data *execute_data TSRMLS_DC) /* {{{ */
550559 if (PHPDBG_G (has_opline_bp )
551560 && phpdbg_find_breakpoint_opline (execute_data -> opline TSRMLS_CC ) == SUCCESS ) {
552561 while (phpdbg_interactive (TSRMLS_C ) != PHPDBG_NEXT ) {
553- continue ;
562+ if (!PHPDBG_G (quitting )) {
563+ continue ;
564+ }
554565 }
555566 }
556-
567+
557568 PHPDBG_G (vmret ) = execute_data -> opline -> handler (execute_data TSRMLS_CC );
558569
559570 phpdbg_print_opline (
560571 execute_data TSRMLS_CC );
561572
562573 if (PHPDBG_G (stepping )) {
563574 while (phpdbg_interactive (TSRMLS_C ) != PHPDBG_NEXT ) {
564- continue ;
575+ if (!PHPDBG_G (quitting )) {
576+ continue ;
577+ }
565578 }
566579 }
567580
0 commit comments