From 46c899ba3024546ee4e3acacacfa9bd32d61a226 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Sun, 24 Nov 2013 09:45:05 -0200 Subject: [PATCH] - Moved conditional bp checking --- phpdbg_bp.c | 7 +++++++ phpdbg_prompt.c | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/phpdbg_bp.c b/phpdbg_bp.c index 1a0452deac..849b8def0d 100644 --- a/phpdbg_bp.c +++ b/phpdbg_bp.c @@ -449,6 +449,13 @@ int phpdbg_find_conditional_breakpoint(TSRMLS_D) /* {{{ */ int phpdbg_find_breakpoint(zend_execute_data* execute_data TSRMLS_DC) /* {{{ */ { + /* conditions cannot be executed by eval()'d code */ + if (!(PHPDBG_G(flags) & PHPDBG_IN_EVAL) + && (PHPDBG_G(flags) & PHPDBG_HAS_COND_BP) + && phpdbg_find_conditional_breakpoint(TSRMLS_C) == SUCCESS) { + return SUCCESS; + } + if (PHPDBG_G(flags) & PHPDBG_HAS_FILE_BP && phpdbg_find_breakpoint_file(execute_data->op_array TSRMLS_CC) == SUCCESS) { return SUCCESS; diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index 1eaaef7856..5c276ab8f8 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -1369,13 +1369,6 @@ zend_vm_enter: phpdbg_print_opline_ex( execute_data, &vars, 0 TSRMLS_CC); - /* conditions cannot be executed by eval()'d code */ - if (!(PHPDBG_G(flags) & PHPDBG_IN_EVAL) - && (PHPDBG_G(flags) & PHPDBG_HAS_COND_BP) - && phpdbg_find_conditional_breakpoint(TSRMLS_C) == SUCCESS) { - DO_INTERACTIVE(); - } - if (PHPDBG_G(flags) & PHPDBG_BP_MASK && phpdbg_find_breakpoint(execute_data TSRMLS_CC) == SUCCESS) { DO_INTERACTIVE(); -- 2.50.1