From: krakjoe Date: Mon, 11 Nov 2013 14:55:36 +0000 (+0000) Subject: fix breakpoint in userland X-Git-Tag: php-5.6.0alpha1~110^2~481 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e8c98020efcd9534830758bc458f4189496b54fc;p=php fix breakpoint in userland --- diff --git a/phpdbg.c b/phpdbg.c index f686c1ac4d..2845add3c0 100644 --- a/phpdbg.c +++ b/phpdbg.c @@ -96,9 +96,11 @@ static PHP_RSHUTDOWN_FUNCTION(phpdbg) /* {{{ */ static PHP_FUNCTION(phpdbg_break) /* {{{ */ { - if (EG(current_execute_data)) { + if (EG(current_execute_data) && EG(active_op_array)) { + zend_ulong opline_num = EG(current_execute_data)->opline - EG(active_op_array)->opcodes; + phpdbg_set_breakpoint_opline_ex( - EG(current_execute_data)->opline TSRMLS_CC); + &EG(active_op_array)->opcodes[opline_num+1] TSRMLS_CC); } } /* }}} */