summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_prompt.c
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2016-09-23 03:29:37 +0200
committerBob Weinand <bobwei9@hotmail.com>2016-09-23 03:29:37 +0200
commitcf35dae6e22da6b06d130630abd024e285939a2e (patch)
tree94bd659559fbe81828248bbe58acc6e02e916aaf /sapi/phpdbg/phpdbg_prompt.c
parent54d8053ac5008efa122211b2aeec57a4931f5d56 (diff)
downloadphp-git-cf35dae6e22da6b06d130630abd024e285939a2e.tar.gz
phpdbg next command must stop when leaving function
Diffstat (limited to 'sapi/phpdbg/phpdbg_prompt.c')
-rw-r--r--sapi/phpdbg/phpdbg_prompt.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c
index 7115d8d472..fb935c3ca5 100644
--- a/sapi/phpdbg/phpdbg_prompt.c
+++ b/sapi/phpdbg/phpdbg_prompt.c
@@ -1541,12 +1541,18 @@ ex_is_caught:
goto next;
}
+ /* not while in conditionals */
+ phpdbg_print_opline_ex(execute_data, 0);
+
/* perform seek operation */
if ((PHPDBG_G(flags) & PHPDBG_SEEK_MASK) && !(PHPDBG_G(flags) & PHPDBG_IN_EVAL)) {
/* current address */
zend_ulong address = (zend_ulong) execute_data->opline;
if (PHPDBG_G(seek_ex) != execute_data) {
+ if (PHPDBG_G(flags) & PHPDBG_IS_STEPPING) {
+ goto stepping;
+ }
goto next;
}
@@ -1590,10 +1596,8 @@ ex_is_caught:
}
}
- /* not while in conditionals */
- phpdbg_print_opline_ex(execute_data, 0);
-
if (PHPDBG_G(flags) & PHPDBG_IS_STEPPING && (PHPDBG_G(flags) & PHPDBG_STEP_OPCODE || execute_data->opline->lineno != PHPDBG_G(last_line))) {
+stepping:
PHPDBG_G(flags) &= ~PHPDBG_IS_STEPPING;
DO_INTERACTIVE(1);
}