summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg.h
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/phpdbg/phpdbg.h')
-rw-r--r--sapi/phpdbg/phpdbg.h29
1 files changed, 27 insertions, 2 deletions
diff --git a/sapi/phpdbg/phpdbg.h b/sapi/phpdbg/phpdbg.h
index 8c0dbb4afa..f3e8ba3107 100644
--- a/sapi/phpdbg/phpdbg.h
+++ b/sapi/phpdbg/phpdbg.h
@@ -67,6 +67,29 @@
# include "TSRM.h"
#endif
+#define ZEND_HASH_FOREACH_NUM_KEY_PTR(ht, _h, _ptr) \
+ ZEND_HASH_FOREACH(ht, 0); \
+ _h = _p->h; \
+ _ptr = Z_PTR_P(_z);
+
+#undef zend_hash_str_add
+#define zend_hash_str_add_tmp(ht, key, len, pData) \
+ _zend_hash_str_add(ht, key, len, pData ZEND_FILE_LINE_CC)
+#define zend_hash_str_add(...) zend_hash_str_add_tmp(__VA_ARGS__)
+
+static zend_always_inline void *zend_hash_index_add_mem(HashTable *ht, zend_ulong h, void *pData, size_t size)
+{
+ zval tmp, *zv;
+
+ ZVAL_PTR(&tmp, NULL);
+ if ((zv = zend_hash_index_add(ht, h, &tmp))) {
+ Z_PTR_P(zv) = pemalloc(size, ht->u.flags & HASH_FLAG_PERSISTENT);
+ memcpy(Z_PTR_P(zv), pData, size);
+ return Z_PTR_P(zv);
+ }
+ return NULL;
+}
+
#ifdef HAVE_LIBREADLINE
# include <readline/readline.h>
# include <readline/history.h>
@@ -225,7 +248,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 */
+ uint32_t last_line; /* last executed line */
phpdbg_lexer_data lexer; /* lexer data */
phpdbg_param_t *parser_stack; /* param stack during lexer / parser phase */
@@ -236,6 +259,7 @@ ZEND_BEGIN_MODULE_GLOBALS(phpdbg)
phpdbg_btree watchpoint_tree; /* tree with watchpoints */
phpdbg_btree watch_HashTables; /* tree with original dtors of watchpoints */
HashTable watchpoints; /* watchpoints */
+ HashTable watch_collisions; /* collision table to check if multiple watches share the same recursive watchpoint */
zend_llist watchlist_mem; /* triggered watchpoints */
zend_bool watchpoint_hit; /* a watchpoint was hit */
void (*original_free_function)(void *); /* the original AG(mm_heap)->_free function */
@@ -243,9 +267,10 @@ ZEND_BEGIN_MODULE_GLOBALS(phpdbg)
char *exec; /* file to execute */
size_t exec_len; /* size of exec */
zend_op_array *ops; /* op_array */
- zval *retval; /* return value */
+ zval retval; /* return value */
int bp_count; /* breakpoint count */
int vmret; /* return from last opcode handler execution */
+ zend_bool in_execution; /* in execution? */
zend_op_array *(*compile_file)(zend_file_handle *file_handle, int type TSRMLS_DC);
HashTable file_sources;