]> granicus.if.org Git - php/commitdiff
fix bug, allow init access to vm uninterrupted
authorkrakjoe <joe.watkins@live.co.uk>
Wed, 20 Nov 2013 17:09:06 +0000 (17:09 +0000)
committerkrakjoe <joe.watkins@live.co.uk>
Wed, 20 Nov 2013 17:09:06 +0000 (17:09 +0000)
phpdbg.c
phpdbg.h
phpdbg_prompt.c

index ec106775292b701c77b843b2f257ef6ca4ae0797..a456c2a1491ccf4dcc5027efea180056a4a5c2a9 100644 (file)
--- a/phpdbg.c
+++ b/phpdbg.c
@@ -654,8 +654,13 @@ phpdbg_main:
 
         /* initialize from file */
         zend_try {
-            phpdbg_init(init_file, init_file_len, init_file_default TSRMLS_CC);
+               PHPDBG_G(flags) |= PHPDBG_IS_INITIALIZING;
+            phpdbg_init(
+               init_file, init_file_len, 
+               init_file_default TSRMLS_CC);
+            PHPDBG_G(flags) &= ~PHPDBG_IS_INITIALIZING;
         } zend_catch {
+               PHPDBG_G(flags) &= ~PHPDBG_IS_INITIALIZING;
             if (PHPDBG_G(flags) & PHPDBG_IS_QUITTING) {
                 goto phpdbg_out;
             }
index 2f99543c6f1cd49f9e9e9b415eb8f64af9c2879c..108db3759dbdc6a0858a9fd741432fef35db7483 100644 (file)
--- a/phpdbg.h
+++ b/phpdbg.h
@@ -98,6 +98,7 @@
 
 #define PHPDBG_IS_REGISTERED   (1<<16)
 #define PHPDBG_IS_STEPONEVAL   (1<<17)
+#define PHPDBG_IS_INITIALIZING (1<<18)
 
 #ifndef _WIN32
 #   define PHPDBG_DEFAULT_FLAGS    (PHPDBG_IS_QUIET|PHPDBG_IS_COLOURED)
index dc41e2498f06c37ba4baed6450062caf8a39de11..48ccc19753579beaaaea01ea62e18cc7bf7594d8 100644 (file)
@@ -1210,8 +1210,9 @@ zend_vm_enter:
        } while(!(PHPDBG_G(flags) & PHPDBG_IS_QUITTING));\
 } while(0)
 
-               /* allow conditional breakpoints to access the vm uninterrupted */
-               if (PHPDBG_G(flags) & PHPDBG_IN_COND_BP) {
+               /* allow conditional breakpoints and 
+                       initialization to access the vm uninterrupted */
+               if (PHPDBG_G(flags) & PHPDBG_IN_COND_BP|PHPDBG_IS_INITIALIZING) {
                        /* skip possible breakpoints */
                        goto next;
                }