Commit Graph

170 Commits

Author SHA1 Message Date
Joe Watkins
6c7e795c15 phpdbg standard input changes 2016-11-13 08:00:15 +00:00
Joe Watkins
a2bc7cf9ca Merge branch 'master' of git.php.net:/php-src 2016-11-12 17:30:41 +00:00
Joe Watkins
6c0e1ca4fa update phpdbg with stdin code change 2016-11-12 17:30:16 +00:00
Kalle Sommer Nielsen
2104bea5d7 Remove Netware support
If this does not break the Unix system somehow, I'll be amazed. This should get most of it out, apologies for any errors this may cause on non-Windows ends which I cannot test atm.
2016-11-12 11:20:01 +01:00
Anatol Belski
5ce2230266 use already exported symbol
(cherry picked from commit ce3e792c2c)
2016-10-14 02:01:22 +02:00
Bob Weinand
06df34072e Fix accidental PHPDBG_ABI break
(cherry picked from commit 671d8054f8)
2016-10-14 01:50:48 +02:00
Bob Weinand
11e7447e04 Merge branch 'PHP-7.0' into PHP-7.1
(cherry picked from commit 37ae5f3931)
2016-10-14 01:48:03 +02:00
Anatol Belski
afbb3b858a Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  use already exported symbol
  Revert "export symbol missing by phpdbg"
2016-10-13 10:08:10 +02:00
Anatol Belski
ce3e792c2c use already exported symbol 2016-10-13 09:55:37 +02:00
Bob Weinand
671d8054f8 Fix accidental PHPDBG_ABI break 2016-10-12 22:16:11 +02:00
Bob Weinand
37ae5f3931 Merge branch 'PHP-7.0' into PHP-7.1 2016-10-12 20:19:10 +02:00
Bob Weinand
5aae01104f Add stdin command and -s command line parameter to phpdbg
This allows reading the initial script file from stdin instead of being forced to put the script into a file in order to run it with phpdbg.
Especially important for programmatic execution of phpdbg.

Also adding tests/include_once.phpt and tests/set_exception_handler.phpt as I seem to have forgotten to git add them sometime long ago...
2016-10-12 20:15:49 +02:00
Bob Weinand
f58cf8b24d Merge branch 'PHP-7.0' into PHP-7.1 2016-10-02 12:46:22 +01:00
Bob Weinand
417a8ef6b4 Fix run command args passing when inmidst execution 2016-10-02 12:45:20 +01:00
Bob Weinand
3fe1010cee Merge branch 'PHP-7.0' into PHP-7.1 2016-10-01 19:14:26 +01:00
Bob Weinand
9d537951c5 Add proper escape sequences and reading stdin from file in phpdbg run command 2016-10-01 19:05:19 +01:00
Bob Weinand
e5d75d7268 Add phpdbg generator command 2016-09-28 13:26:08 +02:00
Anatol Belski
8f256bebef Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  update NEWS
  phpdbg next command must stop when leaving function
2016-09-23 11:25:33 +02:00
Bob Weinand
cf35dae6e2 phpdbg next command must stop when leaving function 2016-09-23 03:29:37 +02:00
Nikita Popov
f1bfd7fe00 Merge branch 'PHP-7.0' into PHP-7.1 2016-09-03 23:31:05 +02:00
Nikita Popov
1ae2d074f8 Fix bug #72996 2016-09-03 23:30:23 +02:00
Bob Weinand
b00376884e Rewrite watchpoints to be much more stable
This mainly involves a separate abstraction layer for elements (e.g. $a->b) and watchpoints (on pointer of the Bucket for example).
Also better comparison handling (value backup vs. page dumps).

It is not yet finished (there are sometimes false positives announced and names not yet perfect), but the functionality is working and not crashing as far as I have tested.
Future scope is also relative watchpoints, e.g. "w $this->val expression()" which does not have the symbol tables as basis, but the value (in this example: return value of expression()) as basis.
2016-07-11 23:58:20 +02:00
Anatol Belski
6bd3b8108a Merge branch 'PHP-7.0'
* PHP-7.0:
  fix condition
2016-05-30 18:36:06 +02:00
Anatol Belski
2524ab9e67 fix condition 2016-05-30 18:35:14 +02:00
Dmitry Stogov
747a482b9c Don't initialize EX(call)->symbol_table on each function call.
Keep it uninitialized, and check ZEND_CALL_HAS_SYMBOL_TABLE flag when necessary.
2016-04-28 15:17:24 +03:00
Dmitry Stogov
6499162ff0 - get rid of EG(scope). zend_get_executed_scope() should be used instead.
- ichanged zval_update_constant_ex(). Use IS_TYPE_IMMUTABLE flag on shared constants and AST, instead of "inline_change" parameter.
2016-04-28 04:13:34 +03:00
Dmitry Stogov
f0a2e8eb13 Removed "zend_fcall_info.function_table". It was assigned in many places, but is never used. 2016-04-27 13:46:38 +03:00
Nikita Popov
f57c0b3249 Merge branch 'PHP-7.0' 2016-03-03 16:50:47 +01:00
James Titcumb
c4b188871e Fix bug #71575 removing extra semicolons outside macros 2016-03-03 16:41:03 +01:00
Dmitry Stogov
c67c166f93 Removed zend_fcall_info.symbol_table 2016-03-02 17:50:55 +03:00
Dmitry Stogov
960b3755b3 Merge branch 'PHP-7.0'
* PHP-7.0:
  PHP-7 zend_call_function() doesn't support symbol_table substitution
2016-03-02 16:57:08 +03:00
Dmitry Stogov
908b662f7f PHP-7 zend_call_function() doesn't support symbol_table substitution 2016-03-02 16:56:39 +03:00
Bob Weinand
eea576d589 Merge branch 'PHP-7.0' 2016-02-17 20:28:07 +01:00
Bob Weinand
055b411218 Fix crash when advancing inside an internal function
This just happened in the "double ctrl+c" mode, when we halted inside an internal function; there was some code assuming a proper op_array
2016-02-17 20:27:46 +01:00
Nikita Popov
2d605e5f24 Merge branch 'PHP-7.0' 2016-02-14 14:47:42 +01:00
Nikita Popov
c9357f82d3 Format string fixes
Conflicts:
	ext/pgsql/pgsql.c
2016-02-14 14:45:53 +01:00
Insu Yun
35d5cd5c6e phpdbg: fix potential format string bug 2016-01-12 04:21:57 +00:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Bob Weinand
4f90e2ec9d Ensure proper set_exception_handler() handling with exit() inside it 2015-10-02 12:37:40 +02:00
Bob Weinand
0c03ba0ad0 Fixed bug #70614 (incorrect exit code in -rr mode with Exceptions) 2015-10-02 12:37:40 +02:00
Bob Weinand
bccac3774b Fixed bug #70531 (-rr should not fallback to interactive mode in phpdbg) 2015-09-23 18:30:13 +02:00
Bob Weinand
4a174ca7e6 Fixed bug #70532 (respect set_exception_handler in phpdbg) 2015-09-23 17:53:29 +02:00
Bob Weinand
491c62e2aa Apply same fixes for until 2015-09-19 15:19:26 +02:00
Bob Weinand
8eadde40cd Fix leave and finish 2015-09-19 14:57:36 +02:00
Xinchen Hui
c359ca8c3d Fixed printing 2015-08-27 11:38:11 +08:00
Bob Weinand
76e3e99dd6 Fix issues with phpdbg SIGINT handler
Also fix valgrind warnings in allocator when not using mmap()ed memory
2015-08-21 23:36:31 +01:00
Bob Weinand
d0ad621906 Fix further leaks 2015-08-04 01:22:04 +02:00
Bob Weinand
d8fe645db4 Fix valgrind errors in phpdbg
Revert "We cannot safely assume that all op array will be refcount 0 after execution"
This reverts commit b6936adb58.

This change turns out to not have been a clever idea and was causing more weirdness than it helped...
2015-08-04 00:00:10 +02:00
Bob Weinand
34596a3ddd Fix breaking on HANDLE_EXCEPTION (opline_before_exception) 2015-08-03 17:15:40 +02:00
Bob Weinand
06ef2aeca9 Skip shebang line if present 2015-08-01 23:28:55 +02:00
Bob Weinand
c0e0f1414e Fix phpdbg stepping on CATCH with exception 2015-07-28 00:10:42 +02:00
Bob Weinand
64f25adb6b Remove -Wunused-result warnings 2015-07-27 15:02:01 +02:00
Bob Weinand
9e8fec1ef7 Fix leaks from bug #70138 2015-07-26 21:49:18 +02:00
Bob Weinand
13525328ed Cleanup shutdown, enable proper memory leak displaying
phpdbg should not memory leak...
2015-07-24 17:17:26 +02:00
Bob Weinand
b7e8f65972 Fix printf format issues on 32 bit 2015-07-23 14:23:42 +02:00
Bob Weinand
75a3de0cd8 Fix misbehaviors with uncaught exceptions and finally or eval 2015-07-20 18:00:43 +02:00
Bob Weinand
c13124cc0f Cleanup exception displaying code in phpdbg 2015-07-16 10:28:59 +02:00
Dmitry Stogov
001ecd3198 Simplify TMP var number decoding (without HashTable) 2015-07-06 17:56:48 +03:00
Dmitry Stogov
7aa7627172 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 13:59:27 +03:00
Bob Weinand
f500471e8c Add yield from to frame leaving instructions 2015-06-29 02:05:33 +02:00
Bob Weinand
5e16722309 Show exception source in phpdbg 2015-06-29 01:41:04 +02:00
Bob Weinand
f42cdf83b0 Fix paths issue when fetching .phpdbginit under Windows 2015-06-25 00:36:01 +02:00
Bob Weinand
28756e99be Fix issue with zend_execute_ex replaced by execute_ex upon icall 2015-06-16 23:37:39 +02:00
Bob Weinand
49bd5eaabf Print should be in *current* context (stack) 2015-04-25 19:15:08 +02:00
Bob Weinand
0ec3a6ff33 FAST_RET opcode also returns 2015-04-22 01:11:59 +02:00
Bob Weinand
e09a0bfc9e Also consider specific catches when checking for uncaught 2015-04-22 01:08:08 +02:00
Bob Weinand
73d31d44e8 Break on uncaught exceptions in current frame in phpdbg 2015-04-22 01:08:07 +02:00
Xinchen Hui
e121ccaaad Fixed warnings and folder marks mess 2015-04-21 21:53:12 +08:00
Bob Weinand
f83ee6a05d Add next command / Fix recursion/exceptions with u/F/L 2015-04-21 12:31:57 +02:00
Bob Weinand
61ba269f4c Show full stacktraces for exceptions in phpdbg 2015-04-20 14:12:47 +02:00
Bob Weinand
890212866d Fix uncaught exception in phpdbg 2015-04-20 13:55:09 +02:00
Bob Weinand
ea643307db Put info to info and made print always output opcodes 2015-03-21 23:16:53 +01:00
Nikita Popov
e39db5773d Fix phpdbg 2015-03-17 22:59:11 +01:00
Xinchen Hui
50e4033475 Let phpdbg refused to be compiled with no CALL zend vm kind 2015-03-16 17:10:26 +08:00
Lior Kaplan
a4384bd3d4 s/PHP Version 5/PHP Version 7/g
Follow up for d0cb7153
2015-03-13 11:09:42 +02:00
Dmitry Stogov
ae26a51f0f Added API function to call VM opcode handler in a portable way 2015-03-13 11:29:43 +03:00
Dmitry Stogov
c2c78dc963 Added specialized versions of DO_FCALL handler:
DO_ICALL - for internal functions
  DO_UCALL - for user functions
  DO_FCALL_BY_NAME - plain, most probably user, funcstions (not methods)
2015-02-25 10:37:21 +03:00
Dmitry Stogov
e10e151e9b Merged zend_array and HashTable into the single data structure.
Now each HashTable is also zend_array, so it's refcounted and may be a subject for Copy on Write
zend_array_dup() was changed to allocate and return HashTable, instead of taking preallocated HashTable as argument.
2015-02-13 22:20:39 +03:00
Joshua Rogers
305c03e757 Use correct deallocator in phpdbg 2015-01-27 09:28:54 +11:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Anatol Belski
9d70df24f8 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  C89 fixes
  use portable struct stat
  fixed macro va args expansion for vs
2014-12-16 12:22:27 +01:00
Anatol Belski
673003757f C89 fixes 2014-12-16 12:20:59 +01:00
Anatol Belski
bee4a28433 use portable struct stat 2014-12-16 12:20:58 +01:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Ferenc Kovacs
0afc04b913 go back with phpdbg to the state of 5.6.3, reverting the controversial commits(remote debugging/xml protocol) 2014-11-26 18:38:36 +01:00
Bob Weinand
113f1fd6d5 Temporarily disable wait/xml protocol... 2014-10-30 23:09:57 +01:00
Anatol Belski
d77ce31763 Merge branch 'PHP-5.6'
* PHP-5.6:
  fix output globals importing
  export output globals
  use portable strndup implementation
  unix sockets aren't available on windows
  dll export APIs needed by phpdbg
  fix sapi/phpdbg/config.w32
  Don't treat warnings as failures in the junit output
2014-10-29 20:04:56 +01:00
Anatol Belski
fc904569ea fix output globals importing 2014-10-29 20:03:28 +01:00
Bob Weinand
ec53351447 Merge remote-tracking branch 'origin/PHP-5.6'
Conflicts:
	configure.in
	main/php_version.h
	sapi/phpdbg/phpdbg.c
	sapi/phpdbg/phpdbg_bp.c
	sapi/phpdbg/phpdbg_prompt.c
2014-10-28 17:40:27 +01:00
Bob Weinand
297baa0c18 Remove the ugly hack via a temp file to store breakpoints 2014-10-28 17:25:48 +01:00
Bob Weinand
fd8a70b1ee Typo (notfoundc => notfound) 2014-10-28 17:25:46 +01:00
Bob Weinand
fe5f5d40f2 *Always* clean up and run destructors 2014-10-28 17:25:43 +01:00
Bob Weinand
a3ae401524 Merge remote-tracking branch 'origin/PHP-5.6' 2014-10-27 13:19:33 +01:00
Bob Weinand
6eab2b9101 Merge phpdbg into PHP-5.6
Conflicts:
	sapi/phpdbg/phpdbg.c
	sapi/phpdbg/phpdbg_prompt.c
2014-10-27 13:11:13 +01:00
Bob Weinand
09da8952d0 Merge remote-tracking branch 'origin/PHP-5.6'
Conflicts:
	sapi/phpdbg/phpdbg.c
	sapi/phpdbg/phpdbg_bp.c
	sapi/phpdbg/phpdbg_list.c
	sapi/phpdbg/phpdbg_parser.c
	sapi/phpdbg/phpdbg_parser.h
	sapi/phpdbg/phpdbg_prompt.c
2014-10-27 00:34:56 +01:00
Bob Weinand
50756b515c Do not execute anything after quit or clean command 2014-10-27 00:00:19 +01:00
Bob Weinand
190f4f9f18 Fix last commit, and do not output unnecessary information 2014-10-27 00:00:18 +01:00
Bob Weinand
3ab7734b88 Stabilize execution, always run destructors and extended file breakpoints 2014-10-27 00:00:16 +01:00