diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2014-10-25 19:09:19 +0200 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2014-10-25 19:09:19 +0200 |
commit | 044f37a832ec1f72c960b02dc7a5b9aca3f43f67 (patch) | |
tree | a910460a3bc2312bcf2aa6b81039396c6a46d0e7 /sapi/phpdbg/phpdbg_prompt.c | |
parent | 87c28ccd28121070ba7225f0ad73b9246dcfdc49 (diff) | |
parent | 24babb01946ccb63b993b98b161455475a697d42 (diff) | |
download | php-git-044f37a832ec1f72c960b02dc7a5b9aca3f43f67.tar.gz |
Merge remote-tracking branch 'origin/PHP-5.6'
Conflicts:
sapi/phpdbg/phpdbg.c
sapi/phpdbg/phpdbg_list.c
Diffstat (limited to 'sapi/phpdbg/phpdbg_prompt.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_prompt.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index 190907e687..f1b1db12fc 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -43,6 +43,7 @@ #include "phpdbg_eol.h" ZEND_EXTERN_MODULE_GLOBALS(phpdbg); +ZEND_EXTERN_MODULE_GLOBALS(output); #ifdef HAVE_LIBDL #ifdef PHP_WIN32 @@ -645,12 +646,21 @@ PHPDBG_COMMAND(ev) /* {{{ */ zend_bool stepping = ((PHPDBG_G(flags) & PHPDBG_IS_STEPPING) == PHPDBG_IS_STEPPING); zval retval; + zend_execute_data *original_execute_data = EG(current_execute_data); + zend_class_entry *original_scope = EG(scope); + zend_vm_stack original_stack = EG(vm_stack); + original_stack->top = EG(vm_stack_top); + + PHPDBG_OUTPUT_BACKUP(); + if (PHPDBG_G(flags) & PHPDBG_IN_SIGNAL_HANDLER) { phpdbg_try_access { phpdbg_parse_variable(param->str, param->len, &EG(symbol_table).ht, 0, phpdbg_output_ev_variable, 0 TSRMLS_CC); } phpdbg_catch_access { phpdbg_error("signalsegv", "", "Could not fetch data, invalid data source"); } phpdbg_end_try_access(); + + PHPDBG_OUTPUT_BACKUP_RESTORE(); return SUCCESS; } @@ -672,6 +682,12 @@ PHPDBG_COMMAND(ev) /* {{{ */ phpdbg_out("\n"); zval_ptr_dtor(&retval); } + } zend_catch { + EG(current_execute_data) = original_execute_data; + EG(scope) = original_scope; + EG(vm_stack_top) = original_stack->top; + EG(vm_stack_end) = original_stack->end; + EG(vm_stack) = original_stack; } zend_end_try(); PHPDBG_G(flags) &= ~PHPDBG_IN_EVAL; @@ -682,6 +698,8 @@ PHPDBG_COMMAND(ev) /* {{{ */ CG(unclean_shutdown) = 0; + PHPDBG_OUTPUT_BACKUP_RESTORE(); + return SUCCESS; } /* }}} */ |