]> granicus.if.org Git - php/commitdiff
...
authorkrakjoe <joe.watkins@live.co.uk>
Fri, 21 Feb 2014 18:52:06 +0000 (18:52 +0000)
committerkrakjoe <joe.watkins@live.co.uk>
Fri, 21 Feb 2014 18:52:06 +0000 (18:52 +0000)
dev/phpdbg_parser.y
phpdbg.h
phpdbg_cmd.c
phpdbg_prompt.c

index 57184ca91971ca4ffcf11537319fa0ab899b865a..a524352e2a38c637991a6d3bdd361e69a372403c 100644 (file)
@@ -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;
index 414500cab729da702edd5d627e96a931bb663b35..670a831e17364e0bd2faa4ac2a008bd24b311387 100644 (file)
--- 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) /* }}} */
index 88eee42114127a00c8f26923e40f01da14caa6b5..416aab8a42330c08a0185c7ceaf7154b1c647599 100644 (file)
@@ -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;
index 3b147b3a6f626c2d76038e862f055e75be1250be..6d7cbb0b971c64b4a8bfc936a44be575b77db122 100644 (file)
@@ -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 */