From: Bob Weinand Date: Fri, 20 Dec 2013 13:27:51 +0000 (+0100) Subject: Merge branch 'master' of sapi/phpdbg into PHP-5.6 X-Git-Tag: php-5.6.0alpha1~110 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cee72c13d7defa8a51c33e2b6ed2c73d85fd4c2a;p=php Merge branch 'master' of sapi/phpdbg into PHP-5.6 Including phpdbg. --- cee72c13d7defa8a51c33e2b6ed2c73d85fd4c2a diff --cc sapi/phpdbg/.gdbinit index 0000000000,0000000000..401a4bb88c new file mode 100644 --- /dev/null +++ b/sapi/phpdbg/.gdbinit @@@ -1,0 -1,0 +1,10 @@@ ++define ____phpdbg_globals ++ if basic_functions_module.zts ++ if !$tsrm_ls ++ set $tsrm_ls = ts_resource_ex(0, 0) ++ end ++ set $phpdbg = ((zend_phpdbg_globals*) (*((void ***) $tsrm_ls))[phpdbg_globals_id-1]) ++ else ++ set $phpdbg = phpdbg_globals ++ end ++end diff --cc sapi/phpdbg/.gitignore index 0000000000,0000000000..297efcbc42 new file mode 100644 --- /dev/null +++ b/sapi/phpdbg/.gitignore @@@ -1,0 -1,0 +1,5 @@@ ++.libs/ ++./phpdbg ++*.lo ++*.o ++build diff --cc sapi/phpdbg/.phpdbginit index 0000000000,1ad35218ed..1ad35218ed mode 000000,100644..100644 --- a/sapi/phpdbg/.phpdbginit +++ b/sapi/phpdbg/.phpdbginit diff --cc sapi/phpdbg/.travis.yml index 0000000000,0000000000..353402858e new file mode 100644 --- /dev/null +++ b/sapi/phpdbg/.travis.yml @@@ -1,0 -1,0 +1,3 @@@ ++language: c ++ ++script: ./travis/ci.sh diff --cc sapi/phpdbg/Changelog.md index 0000000000,c5d8b51514..c5d8b51514 mode 000000,100644..100644 --- a/sapi/phpdbg/Changelog.md +++ b/sapi/phpdbg/Changelog.md diff --cc sapi/phpdbg/Makefile.frag index 0000000000,0000000000..5be6d5b00f new file mode 100644 --- /dev/null +++ b/sapi/phpdbg/Makefile.frag @@@ -1,0 -1,0 +1,28 @@@ ++phpdbg: $(BUILD_BINARY) ++ ++phpdbg-shared: $(BUILD_SHARED) ++ ++$(BUILD_SHARED): $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_PHPDBG_OBJS) ++ $(BUILD_PHPDBG_SHARED) ++ ++$(BUILD_BINARY): $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_PHPDBG_OBJS) ++ $(BUILD_PHPDBG) ++ ++install-phpdbg: $(BUILD_BINARY) ++ @echo "Installing phpdbg binary: $(INSTALL_ROOT)$(bindir)/" ++ @$(mkinstalldirs) $(INSTALL_ROOT)$(bindir) ++ @$(mkinstalldirs) $(INSTALL_ROOT)$(localstatedir)/log ++ @$(mkinstalldirs) $(INSTALL_ROOT)$(localstatedir)/run ++ @$(INSTALL) -m 0755 $(BUILD_BINARY) $(INSTALL_ROOT)$(bindir)/$(program_prefix)phpdbg$(program_suffix)$(EXEEXT) ++ ++clean-phpdbg: ++ @echo "Cleaning phpdbg object files ..." ++ find sapi/phpdbg/ -name *.lo -o -name *.o | xargs rm -f ++ ++test-phpdbg: ++ @echo "Running phpdbg tests ..." ++ @$(top_builddir)/sapi/cli/php sapi/phpdbg/tests/run-tests.php --phpdbg sapi/phpdbg/phpdbg ++ ++.PHONY: clean-phpdbg test-phpdbg ++ ++ diff --cc sapi/phpdbg/README.md index 0000000000,0000000000..e7e5c731a8 new file mode 100644 --- /dev/null +++ b/sapi/phpdbg/README.md @@@ -1,0 -1,0 +1,83 @@@ ++The interactive PHP debugger ++============================ ++ ++Implemented as a SAPI module, phpdbg can excert complete control over the environment without impacting the functionality or performance of your code. ++ ++phpdbg aims to be a lightweight, powerful, easy to use debugging platform for PHP 5.4+ ++ ++[![phpdbg on travis-ci](https://travis-ci.org/krakjoe/phpdbg.png?branch=master)](https://travis-ci.org/krakjoe/phpdbg) ++ ++Features ++======== ++ ++ - Stepthrough Debugging ++ - Flexible Breakpoints (Class Method, Function, File:Line, Address, Opcode) ++ - Easy Access to PHP with built-in eval() ++ - Easy Access to Currently Executing Code ++ - Userland API ++ - SAPI Agnostic - Easily Integrated ++ - PHP Configuration File Support ++ - JIT Super Globals - Set Your Own!! ++ - Optional readline Support - Comfortable Terminal Operation ++ - Remote Debugging Support - Bundled Java GUI ++ - Easy Operation - See Help :) ++ ++Planned ++======= ++ ++ - Improve Everything :) ++ ++Installation ++============ ++ ++To install **phpdbg**, you must compile the source against your PHP installation sources, and enable the SAPI with the configure command. ++ ++``` ++cd /usr/src/php-src/sapi ++git clone https://github.com/krakjoe/phpdbg ++cd ../ ++./buildconf --force ++./configure --enable-phpdbg ++make -j8 ++make install-phpdbg ++``` ++ ++Where the source directory has been used previously to build PHP, there exists a file named *config.nice* which can be used to invoke configure with the same ++parameters as were used by the last execution of *configure*. ++ ++**Note:** PHP must be configured with the switch --with-readline for phpdbg to support history, autocompletion, tab-listing etc. ++ ++Command Line Options ++==================== ++ ++The following switches are implemented (just like cli SAPI): ++ ++ - -n ignore php ini ++ - -c search for php ini in path ++ - -z load zend extension ++ - -d define php ini entry ++ ++The following switches change the default behaviour of phpdbg: ++ ++ - -v disables quietness ++ - -s enabled stepping ++ - -e sets execution context ++ - -b boring - disables use of colour on the console ++ - -I ignore .phpdbginit (default init file) ++ - -i override .phpgdbinit location (implies -I) ++ - -O set oplog output file ++ - -q do not print banner on startup ++ - -r jump straight to run ++ - -E enable step through eval() ++ - -l listen ports for remote mode ++ - -a listen address for remote mode ++ - -S override SAPI name ++ ++**Note:** Passing -rr will cause phpdbg to quit after execution, rather than returning to the console. ++ ++Getting Started ++=============== ++ ++See the website for tutorials/documentation ++ ++http://phpdbg.com diff --cc sapi/phpdbg/config.m4 index 0000000000,274e6409d0..274e6409d0 mode 000000,100644..100644 --- a/sapi/phpdbg/config.m4 +++ b/sapi/phpdbg/config.m4 diff --cc sapi/phpdbg/config.w32 index 0000000000,29031507b3..29031507b3 mode 000000,100644..100644 --- a/sapi/phpdbg/config.w32 +++ b/sapi/phpdbg/config.w32 diff --cc sapi/phpdbg/phpdbg.c index 0000000000,17193ed244..17193ed244 mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c diff --cc sapi/phpdbg/phpdbg.h index 0000000000,f0a59ce473..f0a59ce473 mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg.h +++ b/sapi/phpdbg/phpdbg.h diff --cc sapi/phpdbg/phpdbg.init.d index 0000000000,99a1ab328b..99a1ab328b mode 000000,100755..100755 --- a/sapi/phpdbg/phpdbg.init.d +++ b/sapi/phpdbg/phpdbg.init.d diff --cc sapi/phpdbg/phpdbg_bp.c index 0000000000,69e0fa7086..69e0fa7086 mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg_bp.c +++ b/sapi/phpdbg/phpdbg_bp.c diff --cc sapi/phpdbg/phpdbg_bp.h index 0000000000,ed1b413f6d..ed1b413f6d mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg_bp.h +++ b/sapi/phpdbg/phpdbg_bp.h diff --cc sapi/phpdbg/phpdbg_break.c index 0000000000,1423b960e6..1423b960e6 mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg_break.c +++ b/sapi/phpdbg/phpdbg_break.c diff --cc sapi/phpdbg/phpdbg_break.h index 0000000000,04abeb6805..04abeb6805 mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg_break.h +++ b/sapi/phpdbg/phpdbg_break.h diff --cc sapi/phpdbg/phpdbg_cmd.c index 0000000000,9f052d6f6f..9f052d6f6f mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg_cmd.c +++ b/sapi/phpdbg/phpdbg_cmd.c diff --cc sapi/phpdbg/phpdbg_cmd.h index 0000000000,e779fd4b55..e779fd4b55 mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg_cmd.h +++ b/sapi/phpdbg/phpdbg_cmd.h diff --cc sapi/phpdbg/phpdbg_frame.c index 0000000000,24aff59dd9..24aff59dd9 mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg_frame.c +++ b/sapi/phpdbg/phpdbg_frame.c diff --cc sapi/phpdbg/phpdbg_frame.h index 0000000000,fbccd5404f..fbccd5404f mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg_frame.h +++ b/sapi/phpdbg/phpdbg_frame.h diff --cc sapi/phpdbg/phpdbg_help.c index 0000000000,edb1265955..edb1265955 mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg_help.c +++ b/sapi/phpdbg/phpdbg_help.c diff --cc sapi/phpdbg/phpdbg_help.h index 0000000000,012a1b49e7..012a1b49e7 mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg_help.h +++ b/sapi/phpdbg/phpdbg_help.h diff --cc sapi/phpdbg/phpdbg_info.c index 0000000000,1744f59215..1744f59215 mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg_info.c +++ b/sapi/phpdbg/phpdbg_info.c diff --cc sapi/phpdbg/phpdbg_info.h index 0000000000,5d53812370..5d53812370 mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg_info.h +++ b/sapi/phpdbg/phpdbg_info.h diff --cc sapi/phpdbg/phpdbg_list.c index 0000000000,b49be857ef..b49be857ef mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg_list.c +++ b/sapi/phpdbg/phpdbg_list.c diff --cc sapi/phpdbg/phpdbg_list.h index 0000000000,d618027158..d618027158 mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg_list.h +++ b/sapi/phpdbg/phpdbg_list.h diff --cc sapi/phpdbg/phpdbg_opcode.c index 0000000000,025d57a08d..025d57a08d mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg_opcode.c +++ b/sapi/phpdbg/phpdbg_opcode.c diff --cc sapi/phpdbg/phpdbg_opcode.h index 0000000000,5771488e70..5771488e70 mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg_opcode.h +++ b/sapi/phpdbg/phpdbg_opcode.h diff --cc sapi/phpdbg/phpdbg_print.c index 0000000000,51edcfbf8d..51edcfbf8d mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg_print.c +++ b/sapi/phpdbg/phpdbg_print.c diff --cc sapi/phpdbg/phpdbg_print.h index 0000000000,1232f544d2..1232f544d2 mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg_print.h +++ b/sapi/phpdbg/phpdbg_print.h diff --cc sapi/phpdbg/phpdbg_prompt.c index 0000000000,f2f482b7ec..f2f482b7ec mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c diff --cc sapi/phpdbg/phpdbg_prompt.h index 0000000000,e6706c7d5b..e6706c7d5b mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg_prompt.h +++ b/sapi/phpdbg/phpdbg_prompt.h diff --cc sapi/phpdbg/phpdbg_set.c index 0000000000,2472e1868c..2472e1868c mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg_set.c +++ b/sapi/phpdbg/phpdbg_set.c diff --cc sapi/phpdbg/phpdbg_set.h index 0000000000,1c48786c66..1c48786c66 mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg_set.h +++ b/sapi/phpdbg/phpdbg_set.h diff --cc sapi/phpdbg/phpdbg_utils.c index 0000000000,86c17a71be..86c17a71be mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg_utils.c +++ b/sapi/phpdbg/phpdbg_utils.c diff --cc sapi/phpdbg/phpdbg_utils.h index 0000000000,fbc17b78dd..fbc17b78dd mode 000000,100644..100644 --- a/sapi/phpdbg/phpdbg_utils.h +++ b/sapi/phpdbg/phpdbg_utils.h diff --cc sapi/phpdbg/test.php index 0000000000,5fdbcbe1a4..5fdbcbe1a4 mode 000000,100644..100644 --- a/sapi/phpdbg/test.php +++ b/sapi/phpdbg/test.php diff --cc sapi/phpdbg/tests/commands/0001_basic.test index 0000000000,08aa9ab664..08aa9ab664 mode 000000,100644..100644 --- a/sapi/phpdbg/tests/commands/0001_basic.test +++ b/sapi/phpdbg/tests/commands/0001_basic.test diff --cc sapi/phpdbg/tests/commands/0002_set.test index 0000000000,7720f94fff..7720f94fff mode 000000,100644..100644 --- a/sapi/phpdbg/tests/commands/0002_set.test +++ b/sapi/phpdbg/tests/commands/0002_set.test diff --cc sapi/phpdbg/tests/commands/0101_info.test index 0000000000,397a45c992..397a45c992 mode 000000,100644..100644 --- a/sapi/phpdbg/tests/commands/0101_info.test +++ b/sapi/phpdbg/tests/commands/0101_info.test diff --cc sapi/phpdbg/tests/commands/0102_print.test index 0000000000,de4acb7651..de4acb7651 mode 000000,100644..100644 --- a/sapi/phpdbg/tests/commands/0102_print.test +++ b/sapi/phpdbg/tests/commands/0102_print.test diff --cc sapi/phpdbg/tests/commands/0103_register.test index 0000000000,38841591ca..38841591ca mode 000000,100644..100644 --- a/sapi/phpdbg/tests/commands/0103_register.test +++ b/sapi/phpdbg/tests/commands/0103_register.test diff --cc sapi/phpdbg/tests/commands/0104_clean.test index 0000000000,c7a579be17..c7a579be17 mode 000000,100644..100644 --- a/sapi/phpdbg/tests/commands/0104_clean.test +++ b/sapi/phpdbg/tests/commands/0104_clean.test diff --cc sapi/phpdbg/tests/commands/0105_clear.test index 0000000000,b547b0d6ba..b547b0d6ba mode 000000,100644..100644 --- a/sapi/phpdbg/tests/commands/0105_clear.test +++ b/sapi/phpdbg/tests/commands/0105_clear.test diff --cc sapi/phpdbg/tests/commands/0106_compile.test index 0000000000,d79211ddf7..d79211ddf7 mode 000000,100644..100644 --- a/sapi/phpdbg/tests/commands/0106_compile.test +++ b/sapi/phpdbg/tests/commands/0106_compile.test diff --cc sapi/phpdbg/tests/run-tests.php index 0000000000,1fb6fa1224..1fb6fa1224 mode 000000,100644..100644 --- a/sapi/phpdbg/tests/run-tests.php +++ b/sapi/phpdbg/tests/run-tests.php diff --cc sapi/phpdbg/travis/ci.sh index 0000000000,44d56a01ff..44d56a01ff mode 000000,100755..100755 --- a/sapi/phpdbg/travis/ci.sh +++ b/sapi/phpdbg/travis/ci.sh diff --cc sapi/phpdbg/web-bootstrap.php index 0000000000,7b8c5d30de..7b8c5d30de mode 000000,100644..100644 --- a/sapi/phpdbg/web-bootstrap.php +++ b/sapi/phpdbg/web-bootstrap.php