diff options
Diffstat (limited to 'phpdbg_cmd.h')
-rw-r--r-- | phpdbg_cmd.h | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/phpdbg_cmd.h b/phpdbg_cmd.h index c86f92bb47..7cfe35ba9e 100644 --- a/phpdbg_cmd.h +++ b/phpdbg_cmd.h @@ -40,7 +40,8 @@ typedef enum { STR_PARAM, NUMERIC_PARAM, NUMERIC_FUNCTION_PARAM, - NUMERIC_METHOD_PARAM + NUMERIC_METHOD_PARAM, + STACK_PARAM } phpdbg_param_type; typedef struct _phpdbg_input_t phpdbg_input_t; @@ -53,7 +54,8 @@ struct _phpdbg_input_t { int argc; }; -typedef struct _phpdbg_param { +typedef struct _phpdbg_param phpdbg_param_t; +struct _phpdbg_param { phpdbg_param_type type; long num; zend_ulong addr; @@ -67,7 +69,27 @@ typedef struct _phpdbg_param { } method; char *str; size_t len; -} phpdbg_param_t; + phpdbg_param_t *next; + phpdbg_param_t *top; +}; + +#define phpdbg_init_param(v, t) do{ \ + (v)->type = (t); \ + (v)->addr = 0; \ + (v)->num = 0; \ + (v)->file.name = NULL; \ + (v)->file.line = 0; \ + (v)->method.class = NULL; \ + (v)->method.name = NULL; \ + (v)->str = NULL; \ + (v)->len = 0; \ + (v)->next = NULL; \ + (v)->top = NULL; \ +} while(0) + +#ifndef YYSTYPE +#define YYSTYPE phpdbg_param_t +#endif typedef int (*phpdbg_command_handler_t)(const phpdbg_param_t*, const phpdbg_input_t* TSRMLS_DC); |