]> granicus.if.org Git - php/commitdiff
fix stack entry detection for symbol breakpoints
authorkrakjoe <joe.watkins@live.co.uk>
Mon, 18 Nov 2013 11:04:24 +0000 (11:04 +0000)
committerkrakjoe <joe.watkins@live.co.uk>
Mon, 18 Nov 2013 11:04:24 +0000 (11:04 +0000)
count yield as return for leave/finish

phpdbg_prompt.c
test.php

index 66293e3a9fed2bbf3e8ff80ed195e4df44fc341e..e5cd87f1ac849109ccbf909bc788a1ced2595edc 100644 (file)
@@ -1124,19 +1124,11 @@ zend_vm_enter:
                }
 
                if ((PHPDBG_G(flags) & (PHPDBG_HAS_METHOD_BP|PHPDBG_HAS_SYM_BP))) {
-                       zend_execute_data *previous = execute_data->prev_execute_data;
-                       if (previous && previous != execute_data && previous->opline) {
-                               /* check we are the beginning of a function entry */
-                               if (execute_data->opline == EG(active_op_array)->opcodes) {
-                                       switch (previous->opline->opcode) {
-                                               case ZEND_DO_FCALL:
-                                               case ZEND_DO_FCALL_BY_NAME:
-                                               case ZEND_INIT_STATIC_METHOD_CALL: {
-                                                       if (phpdbg_find_breakpoint_symbol(previous->function_state.function TSRMLS_CC) == SUCCESS) {
-                                                               DO_INTERACTIVE();
-                                                       }
-                                               } break;
-                                       }
+                       /* check we are at the beginning of the stack */
+                       if (execute_data->opline == EG(active_op_array)->opcodes) {
+                               if (phpdbg_find_breakpoint_symbol(
+                                               execute_data->function_state.function TSRMLS_CC) == SUCCESS) {
+                                       DO_INTERACTIVE();
                                }
                        }
                }
index 870f9f4188b6e9a50d473b6ddbba90703c1dea42..45aeb816cbe1a3ca3e3987ba78b5bc0bbe984dc5 100644 (file)
--- a/test.php
+++ b/test.php
@@ -20,7 +20,7 @@ function test() {
 
        $foo();
 
-       return $var;
+       yield $var;
 }
 
 $dbg = new phpdbg();