com php-src: ...: dev/phpdbg_parser.y phpdbg.h phpdbg _cmd.c phpdbg_prompt.c
| From: | Bob Weinand | Date: | Fri, 21 Feb 2014 18:52:06 +0000 |
| Subject: | com php-src: ...: dev/phpdbg_parser.y phpdbg.h phpdbg _cmd.c phpdbg_prompt.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77045@lists.php.net to get a copy of this message | ||
Commit: 28debb47173b5ca7f48a0199d6b6a330b80857ff
Author: krakjoe <joe.watkins@live.co.uk> Fri, 21 Feb 2014 18:52:06 +0000
Parents: d1b02fe2fed850a79a0fce95addbf8188f241e9d
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=28debb47173b5ca7f48a0199d6b6a330b80857ff
Log:
..
Changed paths:
M dev/phpdbg_parser.y
M phpdbg.h
M phpdbg_cmd.c
M phpdbg_prompt.c
Diff:
diff --git a/dev/phpdbg_parser.y b/dev/phpdbg_parser.y
index 57184ca..a524352 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 414500c..670a831 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 88eee42..416aab8 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 3b147b3..6d7cbb0 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 */