File tree Expand file tree Collapse file tree 2 files changed +44
-3
lines changed
Expand file tree Collapse file tree 2 files changed +44
-3
lines changed Original file line number Diff line number Diff line change @@ -1535,12 +1535,18 @@ void phpdbg_execute_ex(zend_execute_data *execute_data) /* {{{ */
15351535 goto next ;
15361536 }
15371537
1538+ /* not while in conditionals */
1539+ phpdbg_print_opline_ex (execute_data , 0 );
1540+
15381541 /* perform seek operation */
15391542 if ((PHPDBG_G (flags ) & PHPDBG_SEEK_MASK ) && !(PHPDBG_G (flags ) & PHPDBG_IN_EVAL )) {
15401543 /* current address */
15411544 zend_ulong address = (zend_ulong ) execute_data -> opline ;
15421545
15431546 if (PHPDBG_G (seek_ex ) != execute_data ) {
1547+ if (PHPDBG_G (flags ) & PHPDBG_IS_STEPPING ) {
1548+ goto stepping ;
1549+ }
15441550 goto next ;
15451551 }
15461552
@@ -1584,10 +1590,8 @@ void phpdbg_execute_ex(zend_execute_data *execute_data) /* {{{ */
15841590 }
15851591 }
15861592
1587- /* not while in conditionals */
1588- phpdbg_print_opline_ex (execute_data , 0 );
1589-
15901593 if (PHPDBG_G (flags ) & PHPDBG_IS_STEPPING && (PHPDBG_G (flags ) & PHPDBG_STEP_OPCODE || execute_data -> opline -> lineno != PHPDBG_G (last_line ))) {
1594+ stepping :
15911595 PHPDBG_G (flags ) &= ~PHPDBG_IS_STEPPING ;
15921596 DO_INTERACTIVE (1 );
15931597 }
Original file line number Diff line number Diff line change 1+ --TEST--
2+ Test next command on function boundaries
3+ --PHPDBG--
4+ b 4
5+ r
6+ n
7+
8+
9+ q
10+ --EXPECTF--
11+ [Successful compilation of %s]
12+ prompt> [Breakpoint #0 added at %s:4]
13+ prompt> [Breakpoint #0 at %s:4, hits: 1]
14+ >00004: echo 0;
15+ 00005: }
16+ 00006:
17+ prompt> 0
18+ [L5 %s RETURN null %s]
19+ >00005: }
20+ 00006:
21+ 00007: foo();
22+ prompt> [L8 %s ECHO 1 %s]
23+ >00008: echo 1;
24+ 00009:
25+ prompt> 1
26+ [L8 %s RETURN 1 %s]
27+ [Script ended normally]
28+ prompt>
29+ --FILE--
30+ <?php
31+
32+ function foo () {
33+ echo 0 ;
34+ }
35+
36+ foo ();
37+ echo 1 ;
You can’t perform that action at this time.
0 commit comments