summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg.h
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2016-07-11 23:28:14 +0200
committerBob Weinand <bobwei9@hotmail.com>2016-07-11 23:58:20 +0200
commitb00376884e00aa04614dd650e119aad653c1f16b (patch)
tree9531526edb549ef5eae6ada0d6a6969dfe085e46 /sapi/phpdbg/phpdbg.h
parent1223f7f91b63d37c1282c05c0fab5a16bc83bbf1 (diff)
downloadphp-git-b00376884e00aa04614dd650e119aad653c1f16b.tar.gz
Rewrite watchpoints to be much more stable
This mainly involves a separate abstraction layer for elements (e.g. $a->b) and watchpoints (on pointer of the Bucket for example). Also better comparison handling (value backup vs. page dumps). It is not yet finished (there are sometimes false positives announced and names not yet perfect), but the functionality is working and not crashing as far as I have tested. Future scope is also relative watchpoints, e.g. "w $this->val expression()" which does not have the symbol tables as basis, but the value (in this example: return value of expression()) as basis.
Diffstat (limited to 'sapi/phpdbg/phpdbg.h')
-rw-r--r--sapi/phpdbg/phpdbg.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/sapi/phpdbg/phpdbg.h b/sapi/phpdbg/phpdbg.h
index 2f95a80f04..227aaebe41 100644
--- a/sapi/phpdbg/phpdbg.h
+++ b/sapi/phpdbg/phpdbg.h
@@ -253,12 +253,15 @@ ZEND_BEGIN_MODULE_GLOBALS(phpdbg)
#endif
phpdbg_btree watchpoint_tree; /* tree with watchpoints */
phpdbg_btree watch_HashTables; /* tree with original dtors of watchpoints */
- HashTable watchpoints; /* watchpoints */
+ HashTable watch_elements; /* user defined watch elements */
HashTable watch_collisions; /* collision table to check if multiple watches share the same recursive watchpoint */
- zend_llist watchlist_mem; /* triggered watchpoints */
+ HashTable watch_recreation; /* watch elements pending recreation of their respective watchpoints */
+ HashTable watch_free; /* pointers to watch for being freed */
+ HashTable *watchlist_mem; /* triggered watchpoints */
+ HashTable *watchlist_mem_backup; /* triggered watchpoints backup table while iterating over it */
zend_bool watchpoint_hit; /* a watchpoint was hit */
void (*original_free_function)(void *); /* the original AG(mm_heap)->_free function */
- phpdbg_watchpoint_t *watch_tmp; /* temporary pointer for a watchpoint */
+ phpdbg_watch_element *watch_tmp; /* temporary pointer for a watch element */
char *exec; /* file to execute */
size_t exec_len; /* size of exec */