pg->lcmd = NULL;
pg->flags = PHPDBG_DEFAULT_FLAGS;
pg->oplog = NULL;
+ memset(&pg->lparam, 0, sizeof(phpdbg_param_t));
} /* }}} */
static PHP_MINIT_FUNCTION(phpdbg) /* {{{ */
} /* }}} */
static PHP_RINIT_FUNCTION(phpdbg) /* {{{ */
-{
+{
zend_hash_init(&PHPDBG_G(bp)[PHPDBG_BREAK_FILE], 8, NULL, php_phpdbg_destroy_bp_file, 0);
zend_hash_init(&PHPDBG_G(bp)[PHPDBG_BREAK_SYM], 8, NULL, php_phpdbg_destroy_bp_symbol, 0);
zend_hash_init(&PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE], 8, NULL, NULL, 0);
zend_hash_init(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD], 8, NULL, php_phpdbg_destroy_bp_methods, 0);
zend_hash_init(&PHPDBG_G(bp)[PHPDBG_BREAK_COND], 8, NULL, php_phpdbg_destroy_bp_condition, 0);
zend_hash_init(&PHPDBG_G(seek), 8, NULL, NULL, 0);
-
+
return SUCCESS;
} /* }}} */
zend_hash_destroy(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD]);
zend_hash_destroy(&PHPDBG_G(bp)[PHPDBG_BREAK_COND]);
zend_hash_destroy(&PHPDBG_G(seek));
-
+
if (PHPDBG_G(exec)) {
efree(PHPDBG_G(exec));
PHPDBG_G(exec) = NULL;
return;
}
- last_pos = mem = mmap(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0);
+ pos = last_pos = mem = mmap(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0);
end_pos = mem + st.st_size;
#else
return;
}
- last_pos = mem = (char*) MapViewOfFile(map, FILE_MAP_READ, 0, 0, 0);
+ pos = last_pos = mem = (char*) MapViewOfFile(map, FILE_MAP_READ, 0, 0, 0);
if (mem == NULL) {
phpdbg_error("Failed to map file in memory");
CloseHandle(map);
return SUCCESS;
} /* }}} */
-static inline void phpdbg_print_function_helper(zend_function *method TSRMLS_DC) {
+static inline void phpdbg_print_function_helper(zend_function *method TSRMLS_DC) /* {{{ */
+{
switch (method->type) {
case ZEND_USER_FUNCTION: {
zend_op_array* op_array = &method->op_array;
}
}
}
-}
+} /* }}} */
PHPDBG_PRINT(exec) /* {{{ */
{