zend_function* fbc;
const char *func_name = str;
size_t func_name_len = strlen(str);
-
+ printf("i_phpdbg_list_func(%s)\n", str);
/* search active scope if begins with period */
if (func_name[0] == '.') {
if (EG(scope)) {
PHPDBG_PRINT(method) /* {{{ */
{
- int result = SUCCESS;
-
if (param->type == METHOD_PARAM) {
zend_class_entry **ce;
} else {
phpdbg_error(
"The method %s could not be found", param->method.name);
- result = FAILURE;
}
efree(lcname);
} else {
phpdbg_error(
"Failed to find the requested class %s", param->method.class);
- result = FAILURE;
}
} else {
phpdbg_error(
"Unsupported parameter type (%s) for command", phpdbg_get_param_type(param TSRMLS_CC));
- result = FAILURE;
}
- return result;
+ return SUCCESS;
} /* }}} */
PHPDBG_PRINT(func) /* {{{ */
{
- int result = SUCCESS;
-
if (param->type == STR_PARAM) {
HashTable *func_table = EG(function_table);
zend_function* fbc;
func_table = &EG(scope)->function_table;
} else {
phpdbg_error("No active class");
- return FAILURE;
+ return SUCCESS;
}
} else if (!EG(function_table)) {
phpdbg_error(
"No function table loaded");
- return FAILURE;
+ return SUCCESS;
} else {
func_table = EG(function_table);
}
} else {
phpdbg_error(
"Function %s not found", func_name);
- result = FAILURE;
}
efree(lcname);
} else {
phpdbg_error(
"Unsupported parameter type (%s) for command", phpdbg_get_param_type(param TSRMLS_CC));
- result = FAILURE;
}
- return result;
+ return SUCCESS;
} /* }}} */
phpdbg_param_t *param = emalloc(sizeof(phpdbg_param_t));
PHPDBG_G(last) = (phpdbg_command_t*) command;
+
+ /* urm ... */
if (PHPDBG_G(lparam)) {
- phpdbg_clear_param(
- PHPDBG_G(lparam) TSRMLS_CC);
- efree(PHPDBG_G(lparam));
+ //phpdbg_clear_param(
+ // PHPDBG_G(lparam) TSRMLS_CC);
+ //efree(PHPDBG_G(lparam));
}
phpdbg_parse_param(
int phpdbg_is_class_method(const char *str, size_t len, char **class, char **method) /* {{{ */
{
- const char *sep = strstr(str, "::");
+ char *sep = NULL;
+
+ if (strstr(str, " ") != NULL)
+ return 0;
+
+ sep = strstr(str, "::");
if (!sep || sep == str || sep+2 == str+len-1) {
return 0;