From: krakjoe Date: Fri, 21 Feb 2014 18:52:06 +0000 (+0000) Subject: ... X-Git-Tag: php-5.6.0beta2~1^2~37^2~20^2~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=28debb47173b5ca7f48a0199d6b6a330b80857ff;p=php ... --- diff --git a/dev/phpdbg_parser.y b/dev/phpdbg_parser.y index 57184ca919..a524352e2a 100644 --- a/dev/phpdbg_parser.y +++ b/dev/phpdbg_parser.y @@ -94,7 +94,7 @@ parameter | T_ID T_DCOLON T_ID { $$.type = METHOD_PARAM; $$.method.class = $1.str; - $$.method.name = $3.str; + $$.method.name = $3.str; } | T_ID T_DCOLON T_ID T_POUND T_DIGITS { $$.type = NUMERIC_METHOD_PARAM; diff --git a/phpdbg.h b/phpdbg.h index 414500cab7..670a831e17 100644 --- a/phpdbg.h +++ b/phpdbg.h @@ -181,7 +181,7 @@ ZEND_BEGIN_MODULE_GLOBALS(phpdbg) const phpdbg_color_t *colors[PHPDBG_COLORS]; /* colors */ phpdbg_command_t *lcmd; /* last command */ - phpdbg_param_t lparam; /* last param */ + phpdbg_param_t lparam; /* last param */ zend_ulong flags; /* phpdbg flags */ ZEND_END_MODULE_GLOBALS(phpdbg) /* }}} */ diff --git a/phpdbg_cmd.c b/phpdbg_cmd.c index 88eee42114..416aab8a42 100644 --- a/phpdbg_cmd.c +++ b/phpdbg_cmd.c @@ -236,6 +236,11 @@ PHPDBG_API void phpdbg_copy_param(const phpdbg_param_t* src, phpdbg_param_t* des dest->str = estrndup(src->str, src->len); dest->len = src->len; break; + + case OP_PARAM: + dest->str = estrndup(src->str, src->len); + dest->len = src->len; + break; case ADDR_PARAM: dest->addr = src->addr; @@ -250,6 +255,7 @@ PHPDBG_API void phpdbg_copy_param(const phpdbg_param_t* src, phpdbg_param_t* des dest->method.name = estrdup(src->method.name); break; + case NUMERIC_FILE_PARAM: case FILE_PARAM: dest->file.name = estrdup(src->file.name); dest->file.line = src->file.line; @@ -712,7 +718,7 @@ PHPDBG_API const phpdbg_command_t* phpdbg_stack_resolve(const phpdbg_command_t * /* {{{ */ PHPDBG_API int phpdbg_stack_execute(phpdbg_param_t *stack, char **why) { - phpdbg_param_t *command = NULL; + phpdbg_param_t *top = NULL; const phpdbg_command_t *handler = NULL; if (stack->type != STACK_PARAM) { @@ -727,22 +733,22 @@ PHPDBG_API int phpdbg_stack_execute(phpdbg_param_t *stack, char **why) { return FAILURE; } - command = (phpdbg_param_t*) stack->next; + top = (phpdbg_param_t*) stack->next; - switch (command->type) { + switch (top->type) { case EVAL_PARAM: - return PHPDBG_COMMAND_HANDLER(eval)(command TSRMLS_CC); + return PHPDBG_COMMAND_HANDLER(eval)(top TSRMLS_CC); case SHELL_PARAM: - return PHPDBG_COMMAND_HANDLER(shell)(command TSRMLS_CC); + return PHPDBG_COMMAND_HANDLER(shell)(top TSRMLS_CC); case STR_PARAM: { handler = phpdbg_stack_resolve( - phpdbg_prompt_commands, NULL, &command, why); + phpdbg_prompt_commands, NULL, &top, why); if (handler) { - if (phpdbg_stack_verify(handler, &command, why) == SUCCESS) { - return handler->handler(command TSRMLS_CC); + if (phpdbg_stack_verify(handler, &top, why) == SUCCESS) { + return handler->handler(top TSRMLS_CC); } } } return FAILURE; diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index 3b147b3a6f..6d7cbb0b97 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -38,8 +38,6 @@ #include "phpdbg_lexer.h" #include "phpdbg_parser.h" -int phpdbg_stack_execute(phpdbg_param_t *stack, char **why); -void phpdbg_stack_free(phpdbg_param_t *stack); int yyparse(phpdbg_param_t *stack, yyscan_t scanner); /* {{{ command declarations */