Skip to content

Commit 50e76d9

Browse files
committed
Always only halt upon first non-recv opcode in a function
1 parent 1f9bba6 commit 50e76d9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sapi/phpdbg/phpdbg_bp.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,8 +1080,9 @@ PHPDBG_API phpdbg_breakbase_t *phpdbg_find_breakpoint(zend_execute_data *execute
10801080
}
10811081

10821082
if (PHPDBG_G(flags) & (PHPDBG_HAS_METHOD_BP|PHPDBG_HAS_SYM_BP)) {
1083-
/* check we are at the beginning of the stack */
1084-
if (execute_data->opline == execute_data->func->op_array.opcodes) {
1083+
zend_op_array *op_array = &execute_data->func->op_array;
1084+
/* check we are at the beginning of the stack, but after argument RECV */
1085+
if (execute_data->opline == op_array->opcodes + op_array->num_args + !!(op_array->fn_flags & ZEND_ACC_VARIADIC)) {
10851086
if ((base = phpdbg_find_breakpoint_symbol(execute_data->func))) {
10861087
goto result;
10871088
}

0 commit comments

Comments
 (0)