@@ -70,79 +70,6 @@ PHPDBG_API const char *phpdbg_get_param_type(const phpdbg_param_t *param TSRMLS_
7070 }
7171}
7272
73- PHPDBG_API phpdbg_param_type phpdbg_parse_param (const char * str , size_t len , phpdbg_param_t * param TSRMLS_DC ) /* {{{ */
74- {
75- char * class_name , * func_name ;
76-
77- if (len == 0 ) {
78- param -> type = EMPTY_PARAM ;
79- goto parsed ;
80- }
81-
82- if (phpdbg_is_addr (str )) {
83- param -> addr = strtoul (str , 0 , 16 );
84- param -> type = ADDR_PARAM ;
85- goto parsed ;
86-
87- } else if (phpdbg_is_numeric (str )) {
88- param -> num = strtol (str , NULL , 0 );
89- param -> type = NUMERIC_PARAM ;
90- goto parsed ;
91-
92- } else if (phpdbg_is_class_method (str , len + 1 , & class_name , & func_name )) {
93- param -> method .class = class_name ;
94- param -> method .name = func_name ;
95- param -> type = METHOD_PARAM ;
96- goto parsed ;
97- } else {
98- char * line_pos = strrchr (str , ':' );
99-
100- if (line_pos && phpdbg_is_numeric (line_pos + 1 )) {
101- if (strchr (str , ':' ) == line_pos ) {
102- char path [MAXPATHLEN ];
103-
104- memcpy (path , str , line_pos - str );
105- path [line_pos - str ] = 0 ;
106- * line_pos = 0 ;
107- param -> file .name = phpdbg_resolve_path (path TSRMLS_CC );
108- param -> file .line = strtol (line_pos + 1 , NULL , 0 );
109- param -> type = FILE_PARAM ;
110-
111- goto parsed ;
112- }
113- }
114-
115- line_pos = strrchr (str , '#' );
116-
117- if (line_pos && phpdbg_is_numeric (line_pos + 1 )) {
118- if (strchr (str , '#' ) == line_pos ) {
119- param -> num = strtol (line_pos + 1 , NULL , 0 );
120-
121- if (phpdbg_is_class_method (str , line_pos - str , & class_name , & func_name )) {
122- param -> method .class = class_name ;
123- param -> method .name = func_name ;
124- param -> type = NUMERIC_METHOD_PARAM ;
125- } else {
126- param -> len = line_pos - str ;
127- param -> str = estrndup (str , param -> len );
128- param -> type = NUMERIC_FUNCTION_PARAM ;
129- }
130-
131- goto parsed ;
132- }
133- }
134- }
135-
136- param -> str = estrndup (str , len );
137- param -> len = len ;
138- param -> type = STR_PARAM ;
139-
140- parsed :
141- phpdbg_debug ("phpdbg_parse_param(\"%s\", %lu): %s" ,
142- str , len , phpdbg_get_param_type (param TSRMLS_CC ));
143- return param -> type ;
144- } /* }}} */
145-
14673PHPDBG_API void phpdbg_clear_param (phpdbg_param_t * param TSRMLS_DC ) /* {{{ */
14774{
14875 if (param ) {
0 commit comments