From: Bob Weinand Date: Tue, 23 Sep 2014 14:51:18 +0000 (+0200) Subject: Merge branch 'master' into xml-protocol X-Git-Tag: php-5.6.3RC1~51^2~52^2~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=beb9520039a6bfb9d258fa217f69eb0f8a151b5d;p=php Merge branch 'master' into xml-protocol Conflicts: phpdbg_prompt.c --- beb9520039a6bfb9d258fa217f69eb0f8a151b5d diff --cc phpdbg_info.c index 258d14a44a,a783bf44fc..d9ef3f9e6d --- a/phpdbg_info.c +++ b/phpdbg_info.c @@@ -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 b877f3511c,ed60e99c46..46033b0ed3 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@@ -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;