@@ -110,6 +110,11 @@ static PHPDBG_COMMAND(next) /* {{{ */
110
110
111
111
static PHPDBG_COMMAND (run ) /* {{{ */
112
112
{
113
+ if (EG (in_execution )) {
114
+ printf ("[Cannot start another execution while on is in progress]\n" );
115
+ return FAILURE ;
116
+ }
117
+
113
118
if (PHPDBG_G (ops ) || PHPDBG_G (exec )) {
114
119
if (!PHPDBG_G (ops )) {
115
120
if (phpdbg_compile (TSRMLS_C ) == FAILURE ) {
@@ -528,7 +533,9 @@ void phpdbg_execute_ex(zend_execute_data *execute_data TSRMLS_DC) /* {{{ */
528
533
if (PHPDBG_G (has_file_bp )
529
534
&& phpdbg_find_breakpoint_file (execute_data -> op_array TSRMLS_CC ) == SUCCESS ) {
530
535
while (phpdbg_interactive (TSRMLS_C ) != PHPDBG_NEXT ) {
531
- continue ;
536
+ if (!PHPDBG_G (quitting )) {
537
+ continue ;
538
+ }
532
539
}
533
540
}
534
541
@@ -540,7 +547,9 @@ void phpdbg_execute_ex(zend_execute_data *execute_data TSRMLS_DC) /* {{{ */
540
547
if (phpdbg_find_breakpoint_symbol (
541
548
previous -> function_state .function TSRMLS_CC ) == SUCCESS ) {
542
549
while (phpdbg_interactive (TSRMLS_C ) != PHPDBG_NEXT ) {
543
- continue ;
550
+ if (!PHPDBG_G (quitting )) {
551
+ continue ;
552
+ }
544
553
}
545
554
}
546
555
}
@@ -550,18 +559,22 @@ void phpdbg_execute_ex(zend_execute_data *execute_data TSRMLS_DC) /* {{{ */
550
559
if (PHPDBG_G (has_opline_bp )
551
560
&& phpdbg_find_breakpoint_opline (execute_data -> opline TSRMLS_CC ) == SUCCESS ) {
552
561
while (phpdbg_interactive (TSRMLS_C ) != PHPDBG_NEXT ) {
553
- continue ;
562
+ if (!PHPDBG_G (quitting )) {
563
+ continue ;
564
+ }
554
565
}
555
566
}
556
-
567
+
557
568
PHPDBG_G (vmret ) = execute_data -> opline -> handler (execute_data TSRMLS_CC );
558
569
559
570
phpdbg_print_opline (
560
571
execute_data TSRMLS_CC );
561
572
562
573
if (PHPDBG_G (stepping )) {
563
574
while (phpdbg_interactive (TSRMLS_C ) != PHPDBG_NEXT ) {
564
- continue ;
575
+ if (!PHPDBG_G (quitting )) {
576
+ continue ;
577
+ }
565
578
}
566
579
}
567
580
0 commit comments