From e4fefee020a9645025758f21186e040d35c58abc Mon Sep 17 00:00:00 2001 From: krakjoe Date: Thu, 14 Nov 2013 16:14:20 +0000 Subject: [PATCH] fix stepping --- phpdbg_prompt.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index f133c24ec08..c490377f7ef 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -595,6 +595,12 @@ int phpdbg_interactive(TSRMLS_D) /* {{{ */ if (!EG(in_execution)) { phpdbg_error("Not running"); } + +#ifdef HAVE_LIBREADLINE + if (cmd) { + free(cmd); + } +#endif return PHPDBG_NEXT; } } @@ -720,16 +726,16 @@ zend_vm_enter: DO_INTERACTIVE(); } } - -next: - PHPDBG_G(vmret) = execute_data->opline->handler(execute_data TSRMLS_CC); - + if (!(PHPDBG_G(flags) & PHPDBG_IN_COND_BP)) { if ((PHPDBG_G(flags) & PHPDBG_IS_STEPPING)) { DO_INTERACTIVE(); } } +next: + PHPDBG_G(vmret) = execute_data->opline->handler(execute_data TSRMLS_CC); + if (PHPDBG_G(vmret) > 0) { switch (PHPDBG_G(vmret)) { case 1: