Lines Matching refs:PHPDBG_G

162 	PHPDBG_G(watchpoint_hit) = 1;  in phpdbg_print_watch_diff()
241 if (PHPDBG_G(watch_userfaultfd)) { in phpdbg_change_watchpoint_access()
255 ioctl(PHPDBG_G(watch_userfaultfd), UFFDIO_REGISTER, &reg); in phpdbg_change_watchpoint_access()
256 ioctl(PHPDBG_G(watch_userfaultfd), UFFDIO_WRITEPROTECT, &protect); in phpdbg_change_watchpoint_access()
262 ioctl(PHPDBG_G(watch_userfaultfd), UFFDIO_UNREGISTER, &reg); in phpdbg_change_watchpoint_access()
296 if (phpdbg_check_for_watchpoint(&PHPDBG_G(watchpoint_tree), page) == NULL) {
303 zend_hash_index_add_empty_element(PHPDBG_G(watchlist_mem), (zend_ulong) page);
337 …ZEND_ASSERT((res = phpdbg_btree_find(&PHPDBG_G(watchpoint_tree), (zend_ulong) watch->addr.ptr)) ==…
338 phpdbg_btree_insert(&PHPDBG_G(watchpoint_tree), (zend_ulong) watch->addr.ptr, watch);
342 phpdbg_btree_delete(&PHPDBG_G(watchpoint_tree), (zend_ulong) watch->addr.ptr);
394 if ((coll = zend_hash_index_find_ptr(&PHPDBG_G(watch_collisions), (zend_ulong) watch->ref))) {
411 zend_hash_index_del(&PHPDBG_G(watch_collisions), (zend_ulong) watch->ref);
433 if (!(coll = zend_hash_index_find_ptr(&PHPDBG_G(watch_collisions), (zend_ulong) watch->ref))) {
462 zend_hash_index_add_ptr(&PHPDBG_G(watch_collisions), (zend_ulong) watch->ref, coll);
476 if (!(coll = zend_hash_index_find_ptr(&PHPDBG_G(watch_collisions), (zend_ulong) watch->ref))) {
486 zend_hash_index_add_ptr(&PHPDBG_G(watch_collisions), (zend_ulong) watch->ref, coll);
505 if ((res = phpdbg_btree_find(&PHPDBG_G(watchpoint_tree), (zend_ulong) watch->addr.ptr)) == NULL) {
648 …if (!(res = phpdbg_btree_find(&PHPDBG_G(watch_HashTables), (zend_ulong) element->parent_container)…
653 phpdbg_btree_insert(&PHPDBG_G(watch_HashTables), (zend_ulong) hti->ht, hti);
674 …phpdbg_btree_result *res = phpdbg_btree_find(&PHPDBG_G(watch_HashTables), (zend_ulong) element->pa…
681 phpdbg_btree_delete(&PHPDBG_G(watch_HashTables), (zend_ulong) hti->ht);
702 if ((prev = zend_hash_find_ptr(&PHPDBG_G(watch_recreation), element->str))) {
711 zend_hash_update_ptr(&PHPDBG_G(watch_recreation), element->str, element);
718 zend_hash_index_add_empty_element(&PHPDBG_G(watch_free), (zend_ulong) element->parent_container);
769 PHPDBG_G(watchpoint_hit) = 1;
770 if (zend_hash_index_del(&PHPDBG_G(watch_elements), child->id) == SUCCESS) {
779 ZEND_HASH_MAP_FOREACH_PTR(&PHPDBG_G(watch_recreation), element) {
781 …if (element->parent || zend_hash_index_find(&PHPDBG_G(watch_free), (zend_ulong) element->parent_co…
801 zend_hash_clean(&PHPDBG_G(watch_recreation));
802 zend_hash_clean(&PHPDBG_G(watch_free));
859 zend_hash_index_del(&PHPDBG_G(watch_elements), element->id);
1025 …phpdbg_btree_result *res = phpdbg_btree_find(&PHPDBG_G(watch_HashTables), (zend_ulong) HT_WATCH_HT…
1045 PHPDBG_G(watchpoint_hit) = 1;
1069 if (watch->type == WATCH_ON_REFCOUNTED && !(PHPDBG_G(flags) & PHPDBG_SHOW_REFCOUNTS)) {
1133 ZEND_HASH_MAP_FOREACH_NUM_KEY(PHPDBG_G(watchlist_mem), page) {
1135 res = phpdbg_btree_find_closest(&PHPDBG_G(watchpoint_tree), page + phpdbg_pagesize - 1);
1140 if (PHPDBG_G(watch_userfaultfd)) {
1148 ioctl(PHPDBG_G(watch_userfaultfd), UFFDIO_WRITEPROTECT, &protect);
1157 zend_hash_clean(PHPDBG_G(watchlist_mem));
1167 if (zend_hash_num_elements(&PHPDBG_G(watch_elements)) == 0) {
1171 if (zend_hash_num_elements(PHPDBG_G(watchlist_mem)) > 0) {
1173 mem_list = PHPDBG_G(watchlist_mem);
1174 PHPDBG_G(watchlist_mem) = PHPDBG_G(watchlist_mem_backup);
1177 …phpdbg_btree_position pos = phpdbg_btree_find_between(&PHPDBG_G(watchpoint_tree), page, page + php…
1183 if ((res = phpdbg_btree_find_closest(&PHPDBG_G(watchpoint_tree), page - 1))) {
1197 PHPDBG_G(watchlist_mem) = mem_list;
1201 ret = PHPDBG_G(watchpoint_hit) ? SUCCESS : FAILURE;
1202 PHPDBG_G(watchpoint_hit) = 0;
1211 if (zend_hash_num_elements(&PHPDBG_G(watch_elements))) {
1212 if ((result = phpdbg_btree_find(&PHPDBG_G(watchpoint_tree), (zend_ulong) ptr))) {
1232 …if ((result = phpdbg_btree_find(&PHPDBG_G(watchpoint_tree), HT_WATCH_OFFSET + (zend_ulong) ptr))) {
1239 zend_hash_index_del(&PHPDBG_G(watch_free), (zend_ulong) ptr);
1242 if (PHPDBG_G(original_free_function)) {
1243 PHPDBG_G(original_free_function)(ptr);
1251 ZEND_HASH_FOREACH_PTR(&PHPDBG_G(watch_elements), element) {
1303 element->parent = PHPDBG_G(watch_tmp);
1314 if (PHPDBG_G(watch_tmp)) {
1315 PHPDBG_G(watch_tmp)->child = element;
1323 zend_hash_next_index_insert_ptr(&PHPDBG_G(watch_elements), element);
1324 element->id = PHPDBG_G(watch_elements).nNextFreeElement - 1;
1329 PHPDBG_G(watch_tmp) = NULL;
1342 …if (PHPDBG_G(watch_tmp) && Z_ISREF_P(PHPDBG_G(watch_tmp)->watch->addr.zv) && Z_REFVAL_P(PHPDBG_G(w…
1353 element->parent = PHPDBG_G(watch_tmp);
1359 if (PHPDBG_G(watch_tmp)) {
1360 PHPDBG_G(watch_tmp)->child = element;
1362 PHPDBG_G(watch_tmp) = element;
1399 if ((element = zend_hash_index_find_ptr(&PHPDBG_G(watch_elements), param->num))) {
1467 phpdbg_btree_init(&PHPDBG_G(watchpoint_tree), sizeof(void *) * 8);
1468 phpdbg_btree_init(&PHPDBG_G(watch_HashTables), sizeof(void *) * 8);
1469 zend_hash_init(&PHPDBG_G(watch_elements), 8, NULL, NULL, 0);
1470 zend_hash_init(&PHPDBG_G(watch_collisions), 8, NULL, NULL, 0);
1471 zend_hash_init(&PHPDBG_G(watch_recreation), 8, NULL, NULL, 0);
1472 zend_hash_init(&PHPDBG_G(watch_free), 8, NULL, NULL, 0);
1475PHPDBG_G(watchlist_mem) = malloc(phpdbg_pagesize > sizeof(HashTable) ? phpdbg_pagesize : sizeof(Ha…
1476 PHPDBG_G(original_watchlist_mem) = PHPDBG_G(watchlist_mem);
1477 …zend_hash_init(PHPDBG_G(watchlist_mem), phpdbg_pagesize / (sizeof(Bucket) + sizeof(uint32_t)), NUL…
1478PHPDBG_G(watchlist_mem_backup) = malloc(phpdbg_pagesize > sizeof(HashTable) ? phpdbg_pagesize : si…
1479 …zend_hash_init(PHPDBG_G(watchlist_mem_backup), phpdbg_pagesize / (sizeof(Bucket) + sizeof(uint32_t…
1481 PHPDBG_G(watch_tmp) = NULL;
1482 PHPDBG_G(watchpoint_hit) = false;
1485 PHPDBG_G(watch_userfaultfd) = syscall(SYS_userfaultfd, O_CLOEXEC);
1486 if (PHPDBG_G(watch_userfaultfd) < 0) {
1487 PHPDBG_G(watch_userfaultfd) = 0;
1492 ioctl(PHPDBG_G(watch_userfaultfd), UFFDIO_API, &userfaultfd_features);
1494 …pthread_create(&PHPDBG_G(watch_userfault_thread), NULL, phpdbg_watchpoint_userfaultfd_thread, ZEND…
1496 PHPDBG_G(watch_userfaultfd) = 0;
1506 ZEND_HASH_MAP_FOREACH_PTR(&PHPDBG_G(watch_recreation), element) {
1514 if (PHPDBG_G(watch_userfaultfd)) {
1515 pthread_cancel(PHPDBG_G(watch_userfault_thread));
1516 close(PHPDBG_G(watch_userfaultfd));
1520 …zend_hash_destroy(&PHPDBG_G(watch_elements)); PHPDBG_G(watch_elements).nNumOfElements = 0; /* phpd…
1521 zend_hash_destroy(&PHPDBG_G(watch_recreation));
1522 zend_hash_destroy(&PHPDBG_G(watch_free));
1523 zend_hash_destroy(&PHPDBG_G(watch_collisions));
1524 zend_hash_destroy(PHPDBG_G(original_watchlist_mem));
1525 free(PHPDBG_G(original_watchlist_mem));
1526 zend_hash_destroy(PHPDBG_G(watchlist_mem_backup));
1527 free(PHPDBG_G(watchlist_mem_backup));
1534 pos = phpdbg_btree_find_between(&PHPDBG_G(watchpoint_tree), 0, -1);