]> granicus.if.org Git - php/commitdiff
fix breakpoint in userland
authorkrakjoe <joe.watkins@live.co.uk>
Mon, 11 Nov 2013 14:55:36 +0000 (14:55 +0000)
committerkrakjoe <joe.watkins@live.co.uk>
Mon, 11 Nov 2013 14:55:36 +0000 (14:55 +0000)
phpdbg.c

index f686c1ac4d24a58f142ff1ff164f774384d7e452..2845add3c017a25645ff7dc9a313073cea3ce37d 100644 (file)
--- 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);
     }
 } /* }}} */