PHPDBG_G(oplog_list) = NULL;
}
+ fflush(stdout);
+ if (SG(request_info).argv0) {
+ free(SG(request_info).argv0);
+ SG(request_info).argv0 = NULL;
+ }
+
+ return SUCCESS;
+}
+/* }}} */
+
+static PHP_RINIT_FUNCTION(phpdbg) /* {{{ */
+{
+ /* deactivate symbol table caching to have these properly destroyed upon stack leaving (especially important for watchpoints) */
+ EG(symtable_cache_limit) = EG(symtable_cache) - 1;
+
+ return SUCCESS;
+} /* }}} */
+
+static PHP_RSHUTDOWN_FUNCTION(phpdbg) /* {{{ */
+{
+ if (PHPDBG_G(stdin_file)) {
+ fclose(PHPDBG_G(stdin_file));
+ PHPDBG_G(stdin_file) = NULL;
+ }
+
return SUCCESS;
} /* }}} */
}
}
}
- php_output_deactivate();
+ {
+ php_stream_wrapper *wrapper = zend_hash_str_find_ptr(php_stream_get_url_stream_wrappers_hash(), ZEND_STRL("php"));
+ wrapper->wops->stream_opener = PHPDBG_G(orig_url_wrap_php);
+ }
+
zend_try {
php_module_shutdown();
} zend_end_try();
php_build_argv(NULL, &PG(http_globals)[TRACK_VARS_SERVER]);
}
- if (ex && ex->symbol_table) {
+ /* clean up from last execution */
++ if (ex && (ZEND_CALL_INFO(ex) & ZEND_CALL_HAS_SYMBOL_TABLE)) {
+ zend_hash_clean(ex->symbol_table);
+ } else {
+ zend_rebuild_symbol_table();
+ }
+ PHPDBG_G(handled_exception) = NULL;
+
+ /* clean seek state */
+ PHPDBG_G(flags) &= ~PHPDBG_SEEK_MASK;
+ zend_hash_clean(&PHPDBG_G(seek));
+
+ /* reset hit counters */
+ phpdbg_reset_breakpoints();
+
zend_try {
PHPDBG_G(flags) ^= PHPDBG_IS_INTERACTIVE;
PHPDBG_G(flags) |= PHPDBG_IS_RUNNING;