summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2015-09-19 15:19:26 +0200
committerBob Weinand <bobwei9@hotmail.com>2015-09-19 15:19:26 +0200
commit491c62e2aa34dfbf8ad8d60523205ba2afba332a (patch)
tree3485fd1486c39184018f7f47e7107308359178b6 /sapi
parent8eadde40cdb1817d23c6aca01df69596877f69a3 (diff)
downloadphp-git-491c62e2aa34dfbf8ad8d60523205ba2afba332a.tar.gz
Apply same fixes for until
Diffstat (limited to 'sapi')
-rw-r--r--sapi/phpdbg/phpdbg_prompt.c32
1 files changed, 14 insertions, 18 deletions
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c
index 2e0f4903f8..cacfe932aa 100644
--- a/sapi/phpdbg/phpdbg_prompt.c
+++ b/sapi/phpdbg/phpdbg_prompt.c
@@ -518,26 +518,23 @@ PHPDBG_COMMAND(continue) /* {{{ */
} /* }}} */
int phpdbg_skip_line_helper() /* {{{ */ {
+ const zend_op_array *op_array = &EG(current_execute_data)->func->op_array;
+ const zend_op *opline = op_array->opcodes;
+
PHPDBG_G(flags) |= PHPDBG_IN_UNTIL;
PHPDBG_G(seek_ex) = EG(current_execute_data);
- {
- const zend_op *opline = EG(current_execute_data)->opline;
- const zend_op_array *op_array = &EG(current_execute_data)->func->op_array;
-
- while (++opline < op_array->opcodes + op_array->last) {
- if (opline->lineno != EG(current_execute_data)->opline->lineno
- || opline->opcode == ZEND_RETURN
- || opline->opcode == ZEND_FAST_RET
- || opline->opcode == ZEND_GENERATOR_RETURN
- || opline->opcode == ZEND_EXIT
- || opline->opcode == ZEND_YIELD
- || opline->opcode == ZEND_YIELD_FROM
- ) {
- zend_hash_index_update_ptr(&PHPDBG_G(seek), (zend_ulong) opline, (void *) opline);
- break;
- }
+ do {
+ if (opline->lineno != EG(current_execute_data)->opline->lineno
+ || opline->opcode == ZEND_RETURN
+ || opline->opcode == ZEND_FAST_RET
+ || opline->opcode == ZEND_GENERATOR_RETURN
+ || opline->opcode == ZEND_EXIT
+ || opline->opcode == ZEND_YIELD
+ || opline->opcode == ZEND_YIELD_FROM
+ ) {
+ zend_hash_index_update_ptr(&PHPDBG_G(seek), (zend_ulong) opline, (void *) opline);
}
- }
+ } while (++opline < op_array->opcodes + op_array->last);
return PHPDBG_UNTIL;
}
@@ -578,7 +575,6 @@ static void phpdbg_seek_to_end(void) /* {{{ */ {
case ZEND_YIELD:
case ZEND_YIELD_FROM:
zend_hash_index_update_ptr(&PHPDBG_G(seek), (zend_ulong) opline, (void *) opline);
- return;
}
} while (++opline < op_array->opcodes + op_array->last);
}