From: krakjoe Date: Sun, 17 Nov 2013 15:01:22 +0000 (+0000) Subject: finish? X-Git-Tag: php-5.6.0alpha1~110^2~269^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e2f20c57c108ca2c6784e1367c9b0c68f73969c7;p=php finish? --- diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index ef041321f5..069f92a7c3 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -985,7 +985,7 @@ void phpdbg_execute_ex(zend_op_array *op_array TSRMLS_DC) /* {{{ */ int last_step = 0; uint last_lineno; const char *last_file; - const zend_execute_data *last_exec = NULL, *last_prev_exec; + zend_op *last_op = NULL; #if PHP_VERSION_ID < 50500 if (EG(exception)) { @@ -1038,20 +1038,22 @@ zend_vm_enter: /* skip possible breakpoints */ goto next; } + if (last_step == PHPDBG_UNTIL && last_file == execute_data->op_array->filename && last_lineno == execute_data->opline->lineno) { /* skip possible breakpoints */ goto next; } + if (last_step == PHPDBG_FINISH) { - if (!(execute_data->prev_execute_data == last_exec - && execute_data == last_prev_exec)) { + if (execute_data->opline < last_op) { /* skip possible breakpoints */ goto next; + } else { + last_step = 0; + last_op = NULL; } - last_exec = NULL; - last_prev_exec = NULL; } /* not while in conditionals */ @@ -1101,9 +1103,8 @@ next: last_lineno = execute_data->opline->lineno; last_file = execute_data->op_array->filename; - if (last_step == PHPDBG_FINISH && last_exec == NULL) { - last_exec = execute_data; - last_prev_exec = execute_data->prev_execute_data; + if (last_step == PHPDBG_FINISH && !last_op) { + last_op = &execute_data->op_array->opcodes[execute_data->op_array->last-1]; } PHPDBG_G(vmret) = execute_data->opline->handler(execute_data TSRMLS_CC);