com php-src: Merge branch 'PHP-7.0' into PHP-7.1: sapi/phpdbg/phpdbg.c sapi/phpdbg/phpdbg.h sapi/phpdbg/phpdbg_prompt.c

From: Date: Sat, 01 Oct 2016 18:14:26 +0000
Subject: com php-src: Merge branch 'PHP-7.0' into PHP-7.1: sapi/phpdbg/phpdbg.c sapi/phpdbg/phpdbg.h sapi/phpdbg/phpdbg_prompt.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-94813@lists.php.net to get a copy of this message
Commit: 3fe1010ceebe231afcee8aceae6782c18da23539 Author: Bob Weinand <bobwei9@hotmail.com> Sat, 1 Oct 2016 19:14:26 +0100 Parents: 5f69c929ea845c2b1e0bfb978f6859d135590a80 9d537951c5e4af5e453dd4d60e74dad039856b80 Branches: PHP-7.1 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3fe1010ceebe231afcee8aceae6782c18da23539 Log: Merge branch 'PHP-7.0' into PHP-7.1 Changed paths: MM sapi/phpdbg/phpdbg.c MM sapi/phpdbg/phpdbg.h MM sapi/phpdbg/phpdbg_prompt.c Diff: diff --cc sapi/phpdbg/phpdbg.c index 1e0b214,234d0f9...0e891f3 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@@ -274,26 -262,11 +274,31 @@@ static PHP_MSHUTDOWN_FUNCTION(phpdbg) / 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; } /* }}} */ @@@ -2014,7 -2036,13 +2047,12 @@@ phpdbg_out } } } - 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(); diff --cc sapi/phpdbg/phpdbg_prompt.c index c0ce007,7315ff2..4ade755 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@@ -728,6 -778,21 +777,21 @@@ free_cmd php_build_argv(NULL, &PG(http_globals)[TRACK_VARS_SERVER]); } + /* clean up from last execution */ - if (ex && ex->symbol_table) { ++ 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;

« previous php.cvs (#94813) next »