]> granicus.if.org Git - php/commitdiff
Merge branch 'master' into xml-protocol
authorBob Weinand <bobwei9@hotmail.com>
Tue, 23 Sep 2014 14:51:18 +0000 (16:51 +0200)
committerBob Weinand <bobwei9@hotmail.com>
Tue, 23 Sep 2014 14:51:18 +0000 (16:51 +0200)
Conflicts:
phpdbg_prompt.c

1  2 
phpdbg_help.c
phpdbg_info.c
phpdbg_prompt.c

diff --cc phpdbg_help.c
Simple merge
diff --cc phpdbg_info.c
index 258d14a44a89e54c33c1cb314776d8ba72a31667,a783bf44fcd6fac54ff225bfdd826cf6e6ca91d4..d9ef3f9e6dfe63902b458e33c069de468fb2d5e3
@@@ -107,20 -115,29 +115,29 @@@ static int phpdbg_print_symbols(zend_bo
                }
        }
  
+       if (show_globals) {
+               zend_hash_apply(CG(auto_globals), (apply_func_t) phpdbg_arm_auto_global TSRMLS_CC);
+               symtable = &EG(symbol_table);
+       } else {
+               symtable = EG(active_symbol_table);
+       }
        zend_hash_init(&vars, 8, NULL, NULL, 0);
  
-       zend_hash_internal_pointer_reset_ex(EG(active_symbol_table), &pos);
-       while (zend_hash_get_current_key_ex(EG(active_symbol_table), &var,
+       zend_hash_internal_pointer_reset_ex(symtable, &pos);
+       while (zend_hash_get_current_key_ex(symtable, &var,
                NULL, NULL, 0, &pos) == HASH_KEY_IS_STRING) {
-               zend_hash_get_current_data_ex(EG(active_symbol_table), (void **)&data, &pos);
-               if (*var != '_') {
-                       zend_hash_update(
-                               &vars, var, strlen(var)+1, (void**)data, sizeof(zval*), NULL);
+               zend_hash_get_current_data_ex(symtable, (void **)&data, &pos);
+               if (zend_is_auto_global(var, strlen(var) TSRMLS_CC) ^ !show_globals) {
+                       zend_hash_update(&vars, var, strlen(var)+1, (void**)data, sizeof(zval*), NULL);
                }
-               zend_hash_move_forward_ex(EG(active_symbol_table), &pos);
+               zend_hash_move_forward_ex(symtable, &pos);
        }
  
-       {
+       if (show_globals) {
 -              phpdbg_notice("Superglobal variables (%d)", zend_hash_num_elements(&vars));
++              phpdbg_notice("variableinfo", "count=\"%d\"", "Superglobal variables (%d)", zend_hash_num_elements(&vars));
+       } else {
                zend_op_array *ops = EG(active_op_array);
  
                if (ops->function_name) {
diff --cc phpdbg_prompt.c
index b877f3511ce091c97841e5b188a0eaf187b866f3,ed60e99c46869ab91794eb040059b2da7e65faa4..46033b0ed3bbda399b6b8e121833f413381bf402
@@@ -610,7 -644,8 +610,8 @@@ PHPDBG_COMMAND(run) /* {{{ *
                        PHPDBG_G(flags) ^= PHPDBG_IS_INTERACTIVE;
                        zend_execute(EG(active_op_array) TSRMLS_CC);
                        PHPDBG_G(flags) ^= PHPDBG_IS_INTERACTIVE;
 -                      php_output_deactivate(TSRMLS_C);
 -                      phpdbg_notice("Script ended normally");
 +//                    php_output_deactivate(TSRMLS_C);
++                      phpdbg_notice("run", "type=\"end\"", "Script ended normally");
                } zend_catch {
                        EG(active_op_array) = orig_op_array;
                        EG(opline_ptr) = orig_opline;