summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_watch.c
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-05-26 17:46:56 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2020-05-26 17:46:56 +0200
commitd2508ef94704b10332e2af2ed0c09d0012cffd69 (patch)
treedbd8a1d5057d383b407e38dc0f963d10de2cbe9f /sapi/phpdbg/phpdbg_watch.c
parent31e410e0980e5c9272c4e4d00ef99c6b50fe0499 (diff)
parent9fad9addb5707efe96dc5b9eeea4e4f00816d1f6 (diff)
downloadphp-git-d2508ef94704b10332e2af2ed0c09d0012cffd69.tar.gz
Merge branch 'PHP-7.4'
* PHP-7.4: Enable phpdbg tests on AppVeyor Make phpdbg test portable Fix several mostly Windows related phpdbg bugs Fix #73926: phpdbg will not accept input on restart execution
Diffstat (limited to 'sapi/phpdbg/phpdbg_watch.c')
-rw-r--r--sapi/phpdbg/phpdbg_watch.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sapi/phpdbg/phpdbg_watch.c b/sapi/phpdbg/phpdbg_watch.c
index 62fb65a67e..784ab3a999 100644
--- a/sapi/phpdbg/phpdbg_watch.c
+++ b/sapi/phpdbg/phpdbg_watch.c
@@ -1404,6 +1404,8 @@ void phpdbg_setup_watchpoints(void) {
zend_hash_init(PHPDBG_G(watchlist_mem), phpdbg_pagesize / (sizeof(Bucket) + sizeof(uint32_t)), NULL, NULL, 1);
PHPDBG_G(watchlist_mem_backup) = malloc(phpdbg_pagesize > sizeof(HashTable) ? phpdbg_pagesize : sizeof(HashTable));
zend_hash_init(PHPDBG_G(watchlist_mem_backup), phpdbg_pagesize / (sizeof(Bucket) + sizeof(uint32_t)), NULL, NULL, 1);
+
+ PHPDBG_G(watch_tmp) = NULL;
}
void phpdbg_destroy_watchpoints(void) {
@@ -1431,3 +1433,13 @@ void phpdbg_destroy_watchpoints(void) {
zend_hash_destroy(PHPDBG_G(watchlist_mem_backup));
free(PHPDBG_G(watchlist_mem_backup));
}
+
+void phpdbg_purge_watchpoint_tree(void) {
+ phpdbg_btree_position pos;
+ phpdbg_btree_result *res;
+
+ pos = phpdbg_btree_find_between(&PHPDBG_G(watchpoint_tree), 0, -1);
+ while ((res = phpdbg_btree_next(&pos))) {
+ phpdbg_deactivate_watchpoint(res->ptr);
+ }
+}