efree((char*)bp->func_name);
} /* }}} */
-void phpdbg_set_breakpoint_file(const char *path, long line_num TSRMLS_DC) /* {{{ */
+PHPDBG_API void phpdbg_set_breakpoint_file(const char *path, long line_num TSRMLS_DC) /* {{{ */
{
struct stat sb;
}
} /* }}} */
-void phpdbg_set_breakpoint_symbol(const char *name TSRMLS_DC) /* {{{ */
+PHPDBG_API void phpdbg_set_breakpoint_symbol(const char *name TSRMLS_DC) /* {{{ */
{
size_t name_len = strlen(name);
}
} /* }}} */
-void phpdbg_set_breakpoint_method(const char* class_name, const char* func_name TSRMLS_DC) /* {{{ */
+PHPDBG_API void phpdbg_set_breakpoint_method(const char* class_name, const char* func_name TSRMLS_DC) /* {{{ */
{
HashTable class_breaks, *class_table;
size_t class_len = strlen(class_name);
}
} /* }}} */
-void phpdbg_set_breakpoint_opline(zend_ulong opline TSRMLS_DC) /* {{{ */
+PHPDBG_API void phpdbg_set_breakpoint_opline(zend_ulong opline TSRMLS_DC) /* {{{ */
{
if (!zend_hash_index_exists(&PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE], opline)) {
phpdbg_breakline_t new_break;
}
} /* }}} */
-void phpdbg_set_breakpoint_opline_ex(phpdbg_opline_ptr_t opline TSRMLS_DC) /* {{{ */
+PHPDBG_API void phpdbg_set_breakpoint_opline_ex(phpdbg_opline_ptr_t opline TSRMLS_DC) /* {{{ */
{
if (!zend_hash_index_exists(&PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE], (zend_ulong) opline)) {
phpdbg_breakline_t new_break;
}
} /* }}} */
-void phpdbg_set_breakpoint_expression(const char *expr, size_t expr_len TSRMLS_DC) /* {{{ */
+PHPDBG_API void phpdbg_set_breakpoint_expression(const char *expr, size_t expr_len TSRMLS_DC) /* {{{ */
{
zend_ulong hash = zend_inline_hash_func(expr, expr_len);
return breakpoint;
} /* }}} */
-void phpdbg_clear_breakpoints(TSRMLS_D) /* {{{ */
+PHPDBG_API void phpdbg_clear_breakpoints(TSRMLS_D) /* {{{ */
{
zend_hash_clean(&PHPDBG_G(bp)[PHPDBG_BREAK_FILE]);
zend_hash_clean(&PHPDBG_G(bp)[PHPDBG_BREAK_SYM]);
PHPDBG_G(bp_count) = 0;
} /* }}} */
-void phpdbg_print_breakpoints(zend_ulong type TSRMLS_DC) /* {{{ */
+PHPDBG_API void phpdbg_print_breakpoints(zend_ulong type TSRMLS_DC) /* {{{ */
{
switch (type) {
case PHPDBG_BREAK_SYM: if ((PHPDBG_G(flags) & PHPDBG_HAS_SYM_BP)) {
int id;
} phpdbg_breakcond_t;
-void phpdbg_set_breakpoint_file(const char*, long TSRMLS_DC);
-void phpdbg_set_breakpoint_symbol(const char* TSRMLS_DC);
-void phpdbg_set_breakpoint_method(const char*, const char* TSRMLS_DC);
-void phpdbg_set_breakpoint_opline(zend_ulong TSRMLS_DC);
-void phpdbg_set_breakpoint_opline_ex(phpdbg_opline_ptr_t TSRMLS_DC);
-void phpdbg_set_breakpoint_expression(const char*, size_t TSRMLS_DC);
+PHPDBG_API void phpdbg_set_breakpoint_file(const char*, long TSRMLS_DC);
+PHPDBG_API void phpdbg_set_breakpoint_symbol(const char* TSRMLS_DC);
+PHPDBG_API void phpdbg_set_breakpoint_method(const char*, const char* TSRMLS_DC);
+PHPDBG_API void phpdbg_set_breakpoint_opline(zend_ulong TSRMLS_DC);
+PHPDBG_API void phpdbg_set_breakpoint_opline_ex(phpdbg_opline_ptr_t TSRMLS_DC);
+PHPDBG_API void phpdbg_set_breakpoint_expression(const char*, size_t TSRMLS_DC);
int phpdbg_find_breakpoint_file(zend_op_array* TSRMLS_DC);
int phpdbg_find_breakpoint_symbol(zend_function* TSRMLS_DC);
int phpdbg_find_breakpoint_opline(phpdbg_opline_ptr_t TSRMLS_DC);
int phpdbg_find_conditional_breakpoint(TSRMLS_D);
-void phpdbg_clear_breakpoints(TSRMLS_D);
-void phpdbg_print_breakpoints(zend_ulong type TSRMLS_DC);
+PHPDBG_API void phpdbg_clear_breakpoints(TSRMLS_D);
+PHPDBG_API void phpdbg_print_breakpoints(zend_ulong type TSRMLS_DC);
#endif /* PHPDBG_BP_H */
ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
-const char *phpdbg_get_param_type(const phpdbg_param_t *param TSRMLS_DC) /* {{{ */
+PHPDBG_API const char *phpdbg_get_param_type(const phpdbg_param_t *param TSRMLS_DC) /* {{{ */
{
switch (param->type) {
case EMPTY_PARAM:
}
}
-phpdbg_param_type phpdbg_parse_param(const char *str, size_t len, phpdbg_param_t *param TSRMLS_DC) /* {{{ */
+PHPDBG_API phpdbg_param_type phpdbg_parse_param(const char *str, size_t len, phpdbg_param_t *param TSRMLS_DC) /* {{{ */
{
char *class_name, *func_name;
return param->type;
} /* }}} */
-void phpdbg_clear_param(phpdbg_param_t *param TSRMLS_DC) /* {{{ */
+PHPDBG_API void phpdbg_clear_param(phpdbg_param_t *param TSRMLS_DC) /* {{{ */
{
if (param) {
switch (param->type) {
} /* }}} */
-phpdbg_input_t **phpdbg_read_argv(char *buffer, int *argc TSRMLS_DC) /* {{{ */
+PHPDBG_API phpdbg_input_t **phpdbg_read_argv(char *buffer, int *argc TSRMLS_DC) /* {{{ */
{
char *p;
char b[PHPDBG_MAX_CMD];
return argv;
} /* }}} */
-phpdbg_input_t *phpdbg_read_input(char *buffered TSRMLS_DC) /* {{{ */
+PHPDBG_API phpdbg_input_t *phpdbg_read_input(char *buffered TSRMLS_DC) /* {{{ */
{
phpdbg_input_t *buffer = NULL;
char *cmd = NULL;
return NULL;
} /* }}} */
-void phpdbg_destroy_input(phpdbg_input_t **input TSRMLS_DC) /*{{{ */
+PHPDBG_API void phpdbg_destroy_input(phpdbg_input_t **input TSRMLS_DC) /*{{{ */
{
if (*input) {
if ((*input)->string) {
}
} /* }}} */
-int phpdbg_do_cmd(const phpdbg_command_t *command, phpdbg_input_t *input TSRMLS_DC) /* {{{ */
+PHPDBG_API int phpdbg_do_cmd(const phpdbg_command_t *command, phpdbg_input_t *input TSRMLS_DC) /* {{{ */
{
int rc = FAILURE;
/*
* Input Management
*/
-phpdbg_input_t* phpdbg_read_input(char *buffered TSRMLS_DC);
-phpdbg_input_t** phpdbg_read_argv(char *buffer, int *argc TSRMLS_DC);
-void phpdbg_destroy_input(phpdbg_input_t** TSRMLS_DC);
+PHPDBG_API phpdbg_input_t* phpdbg_read_input(char *buffered TSRMLS_DC);
+PHPDBG_API phpdbg_input_t** phpdbg_read_argv(char *buffer, int *argc TSRMLS_DC);
+PHPDBG_API void phpdbg_destroy_input(phpdbg_input_t** TSRMLS_DC);
/*
* Parameter Management
*/
-phpdbg_param_type phpdbg_parse_param(const char*, size_t, phpdbg_param_t* TSRMLS_DC);
-void phpdbg_clear_param(phpdbg_param_t* TSRMLS_DC);
-const char* phpdbg_get_param_type(const phpdbg_param_t* TSRMLS_DC);
+PHPDBG_API phpdbg_param_type phpdbg_parse_param(const char*, size_t, phpdbg_param_t* TSRMLS_DC);
+PHPDBG_API void phpdbg_clear_param(phpdbg_param_t* TSRMLS_DC);
+PHPDBG_API const char* phpdbg_get_param_type(const phpdbg_param_t* TSRMLS_DC);
/*
* Command Executor
*/
-int phpdbg_do_cmd(const phpdbg_command_t*, phpdbg_input_t* TSRMLS_DC);
+PHPDBG_API int phpdbg_do_cmd(const phpdbg_command_t*, phpdbg_input_t* TSRMLS_DC);
/**
* Command Declarators