diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2014-10-25 15:29:54 +0200 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2014-10-25 15:29:54 +0200 |
commit | be5242e0fedcf23bdf56a4b1a73f8a84c5b216ce (patch) | |
tree | dd16299d845b5176b6a581a6b7eb020b7ae7a54b /phpdbg_prompt.c | |
parent | e995ad1131781db91fb58002e06d9c638122df3c (diff) | |
download | php-git-be5242e0fedcf23bdf56a4b1a73f8a84c5b216ce.tar.gz |
Set engine back to initial state after fatal-ed ev command
Diffstat (limited to 'phpdbg_prompt.c')
-rw-r--r-- | phpdbg_prompt.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index 82444fbf1d..47d8f20154 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -689,6 +689,16 @@ PHPDBG_COMMAND(ev) /* {{{ */ zend_bool stepping = ((PHPDBG_G(flags) & PHPDBG_IS_STEPPING) == PHPDBG_IS_STEPPING); zval retval; + zend_op **orig_opline = EG(opline_ptr); + zend_op_array *orig_op_array = EG(active_op_array); + zval **orig_retval_ptr = EG(return_value_ptr_ptr); + zend_execute_data *ex = EG(current_execute_data); + HashTable *original_active_symbol_table = EG(active_symbol_table); + zval *original_This = EG(This); + zend_class_entry *original_scope = EG(scope); + zend_class_entry *original_called_scope = EG(called_scope); + zend_vm_stack original_stack = EG(argument_stack); + if (PHPDBG_G(flags) & PHPDBG_IN_SIGNAL_HANDLER) { phpdbg_try_access { phpdbg_parse_variable(param->str, param->len, &EG(symbol_table), 0, phpdbg_output_ev_variable, 0 TSRMLS_CC); @@ -716,6 +726,16 @@ PHPDBG_COMMAND(ev) /* {{{ */ phpdbg_out("\n"); zval_dtor(&retval); } + } zend_catch { + EG(active_op_array) = orig_op_array; + EG(opline_ptr) = orig_opline; + EG(return_value_ptr_ptr) = orig_retval_ptr; + EG(current_execute_data) = ex; + EG(active_symbol_table) = original_active_symbol_table; + EG(This) = original_This; + EG(scope) = original_scope; + EG(called_scope) = original_called_scope; + EG(argument_stack) = original_stack; } zend_end_try(); PHPDBG_G(flags) &= ~PHPDBG_IN_EVAL; |