File tree 3 files changed +45
-3
lines changed
3 files changed +45
-3
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ PHP NEWS
60
60
61
61
- phpdbg:
62
62
. Fixed bug #72996 (phpdbg_prompt.c undefined reference to DL_LOAD). (Nikita)
63
+ . Fixed next command not stopping when leaving function. (Bob)
63
64
64
65
- Session:
65
66
. Fixed bug #68015 (Session does not report invalid uid for files save handler).
Original file line number Diff line number Diff line change @@ -1541,12 +1541,18 @@ void phpdbg_execute_ex(zend_execute_data *execute_data) /* {{{ */
1541
1541
goto next ;
1542
1542
}
1543
1543
1544
+ /* not while in conditionals */
1545
+ phpdbg_print_opline_ex (execute_data , 0 );
1546
+
1544
1547
/* perform seek operation */
1545
1548
if ((PHPDBG_G (flags ) & PHPDBG_SEEK_MASK ) && !(PHPDBG_G (flags ) & PHPDBG_IN_EVAL )) {
1546
1549
/* current address */
1547
1550
zend_ulong address = (zend_ulong ) execute_data -> opline ;
1548
1551
1549
1552
if (PHPDBG_G (seek_ex ) != execute_data ) {
1553
+ if (PHPDBG_G (flags ) & PHPDBG_IS_STEPPING ) {
1554
+ goto stepping ;
1555
+ }
1550
1556
goto next ;
1551
1557
}
1552
1558
@@ -1590,10 +1596,8 @@ void phpdbg_execute_ex(zend_execute_data *execute_data) /* {{{ */
1590
1596
}
1591
1597
}
1592
1598
1593
- /* not while in conditionals */
1594
- phpdbg_print_opline_ex (execute_data , 0 );
1595
-
1596
1599
if (PHPDBG_G (flags ) & PHPDBG_IS_STEPPING && (PHPDBG_G (flags ) & PHPDBG_STEP_OPCODE || execute_data -> opline -> lineno != PHPDBG_G (last_line ))) {
1600
+ stepping :
1597
1601
PHPDBG_G (flags ) &= ~PHPDBG_IS_STEPPING ;
1598
1602
DO_INTERACTIVE (1 );
1599
1603
}
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