]> granicus.if.org Git - php/commitdiff
...
authorkrakjoe <joe.watkins@live.co.uk>
Sun, 10 Nov 2013 21:28:12 +0000 (21:28 +0000)
committerkrakjoe <joe.watkins@live.co.uk>
Sun, 10 Nov 2013 21:28:12 +0000 (21:28 +0000)
phpdbg.c
phpdbg_prompt.c
test.php

index e07cb4ad36b4879444a6e4880cddf47ef887e78b..997c273836620729fc70aad20c886916e8cbc577 100644 (file)
--- a/phpdbg.c
+++ b/phpdbg.c
@@ -27,6 +27,7 @@ void (*zend_execute_internal_old)(zend_execute_data *execute_data_ptr, zend_fcal
 static inline void php_phpdbg_globals_ctor(zend_phpdbg_globals *pg) /* {{{ */
 {
     pg->exec = NULL;
+    pg->exec_len = 0;
     pg->ops = NULL;
     pg->stepping = 0;
     pg->vmret = 0;
index 55bf0482ec4bad77b3308b862c3d339875ebc8ba..7671b2234b0f929e097abe702ba121507157404d 100644 (file)
@@ -383,7 +383,7 @@ zend_vm_enter:
                }
 #endif
 
-        if (PHPDBG_G(has_file_bp) 
+        if (PHPDBG_G(has_file_bp)
                        && phpdbg_find_breakpoint_file(execute_data->op_array TSRMLS_CC) == SUCCESS) {
                        while (phpdbg_interactive(0, NULL TSRMLS_CC) != PHPDBG_NEXT) {
                                continue;
@@ -393,7 +393,7 @@ zend_vm_enter:
         if (PHPDBG_G(has_sym_bp)) {
             zend_execute_data *previous = execute_data->prev_execute_data;
             if (previous && (previous != execute_data)) {
-                if (previous->opline) {
+                if (previous->opline && execute_data->opline->opcode != ZEND_RETURN) {
                     if (previous->opline->opcode == ZEND_DO_FCALL || previous->opline->opcode == ZEND_DO_FCALL_BY_NAME) {
                         if (phpdbg_find_breakpoint_symbol(previous->function_state.function TSRMLS_CC) == SUCCESS) {
                             while (phpdbg_interactive(0, NULL TSRMLS_CC) != PHPDBG_NEXT) {
index a433605823bc4490dcd04013e6d9e03d8226930e..bed99d3e9b7e794c828803fc48409d8160dc8d36 100644 (file)
--- a/test.php
+++ b/test.php
@@ -5,8 +5,11 @@ function test() {
 function test2() {
     echo "Hello World 2\n";
 }
+
 if (!isset($greeting)) {
     echo test();
 }
+
+test2();
 return true;
 ?>