diff options
Diffstat (limited to 'phpdbg_watch.c')
-rw-r--r-- | phpdbg_watch.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/phpdbg_watch.c b/phpdbg_watch.c index 41c5788a19..fe161ab7a8 100644 --- a/phpdbg_watch.c +++ b/phpdbg_watch.c @@ -631,9 +631,16 @@ static void phpdbg_print_changed_zval(phpdbg_watch_memdump *dump TSRMLS_DC) { /* Show to the user what changed and delete watchpoint upon removal */ if (memcmp(oldPtr, watch->addr.ptr, watch->size) != SUCCESS) { - PHPDBG_G(watchpoint_hit) = 1; + if (PHPDBG_G(flags) & PHPDBG_SHOW_REFCOUNTS || (watch->type == WATCH_ON_ZVAL && memcmp(oldPtr, watch->addr.zv, sizeof(zvalue_value))) || (watch->type == WATCH_ON_HASHTABLE +#if ZEND_DEBUG + && !watch->addr.ht->inconsistent +#endif + && zend_hash_num_elements((HashTable *)oldPtr) != zend_hash_num_elements(watch->addr.ht))) { + PHPDBG_G(watchpoint_hit) = 1; + + phpdbg_notice("Breaking on watchpoint %s", watch->str); + } - phpdbg_notice("Breaking on watchpoint %s", watch->str); switch (watch->type) { case WATCH_ON_ZVAL: { int removed = ((zval *)oldPtr)->refcount__gc != watch->addr.zv->refcount__gc && !zend_symtable_exists(watch->parent_container, watch->name_in_parent, watch->name_in_parent_len + 1); |