com php-src: Breakpoints now hit only once if line was not switched: phpdbg.h phpdbg_prompt.c

From: Date: Sun, 20 Apr 2014 11:25:28 +0000
Subject: com php-src: Breakpoints now hit only once if line was not switched: phpdbg.h phpdbg_prompt.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-76983@lists.php.net to get a copy of this message
Commit: 5a7497904e4f0f3bd300e1353a26fab80c178321 Author: Bob Weinand <bobwei9@hotmail.com> Sun, 20 Apr 2014 13:25:28 +0200 Parents: 508c379428f2d1bc14321fdada9170bb15b8776e Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5a7497904e4f0f3bd300e1353a26fab80c178321 Log: Breakpoints now hit only once if line was not switched Changed paths: M phpdbg.h M phpdbg_prompt..c Diff: diff --git a/phpdbg.h b/phpdbg.h index 43f26ca..615af57 100644 --- a/phpdbg.h +++ b/phpdbg.h @@ -173,6 +173,7 @@ ZEND_BEGIN_MODULE_GLOBALS(phpdbg) HashTable registered; /* registered */ HashTable seek; /* seek oplines */ phpdbg_frame_t frame; /* frame */ + zend_uint last_line; /* last executed line */ #ifndef _WIN32 struct sigaction old_sigsegv_signal; /* segv signal handler */ diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index c6297c0..dcbd2ba 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -1325,10 +1325,10 @@ zend_vm_enter: { phpdbg_breakbase_t *brake; - if ((PHPDBG_G(flags) & PHPDBG_BP_MASK) && - (brake = phpdbg_find_breakpoint(execute_data TSRMLS_CC))) { - phpdbg_hit_breakpoint( - brake, 1 TSRMLS_CC); + if ((PHPDBG_G(flags) & PHPDBG_BP_MASK) + && (brake = phpdbg_find_breakpoint(execute_data TSRMLS_CC)) + && (brake->type != PHPDBG_BREAK_FILE || execute_data->opline->lineno != PHPDBG_G(last_line))) { + phpdbg_hit_breakpoint(brake, 1 TSRMLS_CC); DO_INTERACTIVE(); } } @@ -1345,6 +1345,8 @@ next: DO_INTERACTIVE(); } + PHPDBG_G(last_line) = execute_data->opline->lineno; + PHPDBG_G(vmret) = execute_data->opline->handler(execute_data TSRMLS_CC); if (PHPDBG_G(vmret) > 0) {

« previous php.cvs (#76983) next »