From: krakjoe Date: Mon, 18 Nov 2013 11:04:24 +0000 (+0000) Subject: fix stack entry detection for symbol breakpoints X-Git-Tag: php-5.6.0alpha1~110^2~243 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5cc88ca88a5388865ceab7c116be1c4c6b57a97f;p=php fix stack entry detection for symbol breakpoints count yield as return for leave/finish --- diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index 66293e3a9f..e5cd87f1ac 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -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(); } } } diff --git a/test.php b/test.php index 870f9f4188..45aeb816cb 100644 --- a/test.php +++ b/test.php @@ -20,7 +20,7 @@ function test() { $foo(); - return $var; + yield $var; } $dbg = new phpdbg();