Skip to content

Commit 6adc300

Browse files
committed
Merge sapi/phpdbg into PHP-5.6
2 parents be133d4 + 158b03f commit 6adc300

12 files changed

+1524
-3045
lines changed

Diff for: sapi/phpdbg/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
phpdbg
33
*.lo
44
*.o
5+
*.output
56
build

Diff for: sapi/phpdbg/Makefile.frag

+9-6
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@ $(BUILD_SHARED): $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_PHPDBG_OBJS)
88
$(BUILD_BINARY): $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_PHPDBG_OBJS)
99
$(BUILD_PHPDBG)
1010

11-
$(builddir)/sapi/phpdbg/phpdbg_lexer.lo: $(srcdir)/sapi/phpdbg/phpdbg_parser.h
11+
%.c: %.y
12+
%.c: %.l
1213

13-
$(srcdir)/sapi/phpdbg/phpdbg_lexer.c: $(srcdir)/sapi/phpdbg/phpdbg_lexer.l
14-
@(cd $(top_srcdir); $(RE2C) $(RE2C_FLAGS) --no-generation-date -cbdFo sapi/phpdbg/phpdbg_lexer.c sapi/phpdbg/phpdbg_lexer.l)
14+
$(builddir)/phpdbg_lexer.lo: $(srcdir)/phpdbg_parser.h
1515

16-
$(srcdir)/sapi/phpdbg/phpdbg_parser.h: $(srcdir)/sapi/phpdbg/phpdbg_parser.c
17-
$(srcdir)/sapi/phpdbg/phpdbg_parser.c: $(srcdir)/sapi/phpdbg/phpdbg_parser.y
18-
@$(YACC) -p phpdbg_ -v -d $(srcdir)/sapi/phpdbg/phpdbg_parser.y -o $@
16+
$(srcdir)/phpdbg_lexer.c: $(srcdir)/phpdbg_lexer.l
17+
@(cd $(top_srcdir); $(RE2C) $(RE2C_FLAGS) --no-generation-date -cbdFo $(srcdir)/phpdbg_lexer.c $(srcdir)/phpdbg_lexer.l)
18+
19+
$(srcdir)/phpdbg_parser.h: $(srcdir)/phpdbg_parser.c
20+
$(srcdir)/phpdbg_parser.c: $(srcdir)/phpdbg_parser.y
21+
@$(YACC) -p phpdbg_ -v -d $(srcdir)/phpdbg_parser.y -o $@
1922

2023
install-phpdbg: $(BUILD_BINARY)
2124
@echo "Installing phpdbg binary: $(INSTALL_ROOT)$(bindir)/"

Diff for: sapi/phpdbg/config.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if test "$PHP_PHPDBG" != "no"; then
2828
PHP_SUBST(PHP_PHPDBG_FILES)
2929
PHP_SUBST(PHPDBG_EXTRA_LIBS)
3030

31-
PHP_ADD_MAKEFILE_FRAGMENT([$abs_srcdir/sapi/phpdbg/Makefile.frag])
31+
PHP_ADD_MAKEFILE_FRAGMENT([$abs_srcdir/sapi/phpdbg/Makefile.frag], [$abs_srcdir/sapi/phpdbg], [$abs_builddir/sapi/phpdbg])
3232
PHP_SELECT_SAPI(phpdbg, program, $PHP_PHPDBG_FILES, $PHP_PHPDBG_CFLAGS, [$(SAPI_PHPDBG_PATH)])
3333

3434
BUILD_BINARY="sapi/phpdbg/phpdbg"

Diff for: sapi/phpdbg/phpdbg.h

+6-1
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,14 @@
6969
# include <readline/history.h>
7070
#endif
7171

72+
#include "phpdbg_lexer.h"
7273
#include "phpdbg_cmd.h"
7374
#include "phpdbg_utils.h"
7475
#include "phpdbg_btree.h"
7576
#include "phpdbg_watch.h"
7677

78+
int phpdbg_do_parse(phpdbg_param_t *stack, char *input TSRMLS_DC);
79+
7780
#ifdef ZTS
7881
# define PHPDBG_G(v) TSRMG(phpdbg_globals_id, zend_phpdbg_globals *, v)
7982
#else
@@ -176,10 +179,12 @@ ZEND_BEGIN_MODULE_GLOBALS(phpdbg)
176179
phpdbg_frame_t frame; /* frame */
177180
zend_uint last_line; /* last executed line */
178181

182+
phpdbg_lexer_data lexer; /* lexer data */
183+
phpdbg_param_t *parser_stack; /* param stack during lexer / parser phase */
184+
179185
#ifndef _WIN32
180186
struct sigaction old_sigsegv_signal; /* segv signal handler */
181187
#endif
182-
183188
phpdbg_btree watchpoint_tree; /* tree with watchpoints */
184189
phpdbg_btree watch_HashTables; /* tree with original dtors of watchpoints */
185190
HashTable watchpoints; /* watchpoints */

0 commit comments

Comments
 (0)