From fedd47e383c9a747560dd506e9b81a6bd231d9f2 Mon Sep 17 00:00:00 2001 From: krakjoe Date: Sun, 10 Nov 2013 21:28:12 +0000 Subject: [PATCH] ... --- phpdbg.c | 1 + phpdbg_prompt.c | 4 ++-- test.php | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/phpdbg.c b/phpdbg.c index e07cb4ad36..997c273836 100644 --- a/phpdbg.c +++ b/phpdbg.c @@ -27,6 +27,7 @@ void (*zend_execute_internal_old)(zend_execute_data *execute_data_ptr, zend_fcal static inline void php_phpdbg_globals_ctor(zend_phpdbg_globals *pg) /* {{{ */ { pg->exec = NULL; + pg->exec_len = 0; pg->ops = NULL; pg->stepping = 0; pg->vmret = 0; diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index 55bf0482ec..7671b2234b 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -383,7 +383,7 @@ zend_vm_enter: } #endif - if (PHPDBG_G(has_file_bp) + if (PHPDBG_G(has_file_bp) && phpdbg_find_breakpoint_file(execute_data->op_array TSRMLS_CC) == SUCCESS) { while (phpdbg_interactive(0, NULL TSRMLS_CC) != PHPDBG_NEXT) { continue; @@ -393,7 +393,7 @@ zend_vm_enter: if (PHPDBG_G(has_sym_bp)) { zend_execute_data *previous = execute_data->prev_execute_data; if (previous && (previous != execute_data)) { - if (previous->opline) { + if (previous->opline && execute_data->opline->opcode != ZEND_RETURN) { if (previous->opline->opcode == ZEND_DO_FCALL || previous->opline->opcode == ZEND_DO_FCALL_BY_NAME) { if (phpdbg_find_breakpoint_symbol(previous->function_state.function TSRMLS_CC) == SUCCESS) { while (phpdbg_interactive(0, NULL TSRMLS_CC) != PHPDBG_NEXT) { diff --git a/test.php b/test.php index a433605823..bed99d3e9b 100644 --- a/test.php +++ b/test.php @@ -5,8 +5,11 @@ function test() { function test2() { echo "Hello World 2\n"; } + if (!isset($greeting)) { echo test(); } + +test2(); return true; ?> -- 2.40.0