}
}
+
+ 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) {
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;