Skip to content

Commit

Permalink
Merge remote-tracking branch 'phpdbg/master' into PHP-5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
weltling committed Apr 24, 2014
2 parents 9280e25 + 3e6a387 commit cd26419
Show file tree
Hide file tree
Showing 7 changed files with 2,026 additions and 17 deletions.
2 changes: 0 additions & 2 deletions sapi/phpdbg/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ phpdbg
*.lo
*.o
build
phpdbg_parser.c
phpdbg_parser.h
4 changes: 3 additions & 1 deletion sapi/phpdbg/config.w32
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
ARG_ENABLE('phpdbg', 'Build phpdbg', 'no');
ARG_ENABLE('phpdbgs', 'Build phpdbg shared', 'no');

PHPDBG_SOURCES='phpdbg.c phpdbg_prompt.c phpdbg_cmd.c phpdbg_info.c phpdbg_help.c phpdbg_break.c phpdbg_print.c phpdbg_bp.c phpdbg_opcode.c phpdbg_list.c phpdbg_utils.c phpdbg_set.c phpdbg_frame.c phpdbg_watch.c phpdbg_win.c phpdbg_btree.c';
PHPDBG_SOURCES='phpdbg.c phpdbg_prompt.c phpdbg_cmd.c phpdbg_info.c phpdbg_help.c phpdbg_break.c phpdbg_print.c phpdbg_bp.c phpdbg_opcode.c phpdbg_list.c phpdbg_utils.c phpdbg_set.c phpdbg_frame.c phpdbg_watch.c phpdbg_win.c phpdbg_btree.c phpdbg_parser.c phpdbg_lexer.c';
PHPDBG_DLL='php' + PHP_VERSION + 'phpdbg.dll';
PHPDBG_EXE='phpdbg.exe';

if (PHP_PHPDBG == "yes") {
SAPI('phpdbg', PHPDBG_SOURCES, PHPDBG_EXE);
ADD_FLAG("LIBS_PHPDBG", "ws2_32.lib user32.lib");
DEFINE("CFLAGS", configure_subst.item("CFLAGS") + " /EHa");
ADD_FLAG("CFLAGS_PHPDBG", "/D YY_NO_UNISTD_H");
}

if (PHP_PHPDBGS == "yes") {
SAPI('phpdbgs', PHPDBG_SOURCES, PHPDBG_DLL, '/D PHP_PHPDBG_EXPORTS /I win32');
ADD_FLAG("LIBS_PHPDBGS", "ws2_32.lib user32.lib");
DEFINE("CFLAGS", configure_subst.item("CFLAGS") + " /EHa");
ADD_FLAG("CFLAGS_PHPDBG", "/D YY_NO_UNISTD_H");
}
8 changes: 4 additions & 4 deletions sapi/phpdbg/phpdbg_lexer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ YY_RULE_SETUP
#line 78 "/usr/src/php-src/sapi/phpdbg/phpdbg_lexer.l"
{
phpdbg_init_param(yylval, STR_PARAM);
yylval->str = strndup(yytext, yyleng);
yylval->str = zend_strndup(yytext, yyleng);
yylval->len = yyleng;
return T_PROTO;
}
Expand Down Expand Up @@ -1087,7 +1087,7 @@ YY_RULE_SETUP
#line 108 "/usr/src/php-src/sapi/phpdbg/phpdbg_lexer.l"
{
phpdbg_init_param(yylval, OP_PARAM);
yylval->str = strndup(yytext, yyleng);
yylval->str = zend_strndup(yytext, yyleng);
yylval->len = yyleng;
return T_OPCODE;
}
Expand All @@ -1097,7 +1097,7 @@ YY_RULE_SETUP
#line 114 "/usr/src/php-src/sapi/phpdbg/phpdbg_lexer.l"
{
phpdbg_init_param(yylval, STR_PARAM);
yylval->str = strndup(yytext, yyleng);
yylval->str = zend_strndup(yytext, yyleng);
yylval->len = yyleng;
return T_ID;
}
Expand All @@ -1108,7 +1108,7 @@ YY_RULE_SETUP
#line 122 "/usr/src/php-src/sapi/phpdbg/phpdbg_lexer.l"
{
phpdbg_init_param(yylval, STR_PARAM);
yylval->str = strndup(yytext, yyleng);
yylval->str = zend_strndup(yytext, yyleng);
yylval->len = yyleng;
BEGIN(INITIAL);
return T_INPUT;
Expand Down
8 changes: 4 additions & 4 deletions sapi/phpdbg/phpdbg_lexer.l
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ INPUT [^\n]+
<INITIAL,NORMAL>{
{ID}[:]{1}[//]{2} {
phpdbg_init_param(yylval, STR_PARAM);
yylval->str = strndup(yytext, yyleng);
yylval->str = zend_strndup(yytext, yyleng);
yylval->len = yyleng;
return T_PROTO;
}
Expand Down Expand Up @@ -107,21 +107,21 @@ INPUT [^\n]+
}
{OPCODE} {
phpdbg_init_param(yylval, OP_PARAM);
yylval->str = strndup(yytext, yyleng);
yylval->str = zend_strndup(yytext, yyleng);
yylval->len = yyleng;
return T_OPCODE;
}
{ID} {
phpdbg_init_param(yylval, STR_PARAM);
yylval->str = strndup(yytext, yyleng);
yylval->str = zend_strndup(yytext, yyleng);
yylval->len = yyleng;
return T_ID;
}
}

<RAW>{INPUT} {
phpdbg_init_param(yylval, STR_PARAM);
yylval->str = strndup(yytext, yyleng);
yylval->str = zend_strndup(yytext, yyleng);
yylval->len = yyleng;
BEGIN(INITIAL);
return T_INPUT;
Expand Down
Loading

0 comments on commit cd26419

Please sign in to comment.