summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg.c
Commit message (Collapse)AuthorAgeFilesLines
* Consolidate the usage of "either" and "one of" in error messagesMáté Kocsis2020-09-201-1/+1
| | | | Closes GH-6173
* Remove support for EXT_NOPNikita Popov2020-09-181-1/+2
| | | | | | This is an annoying edge case that regularly gets broken. As we're not aware of significant users of this API, and there are other ways to hook this, remove support for EXT_NOP.
* Simplify error type filtertwosee2020-09-101-25/+18
| | | | Closes GH-6049.
* Disable report_zend_debug by defaultNikita Popov2020-08-121-12/+1
| | | | | | We might just want to drop this completely, but at least don't enable it by default. It already gets disabled by a number of SAPIs, but we should make that the default state.
* Disable JIT for PHPDBGDmitry Stogov2020-07-211-0/+12
|
* Remove proto comments from C filesMax Semenik2020-07-061-16/+12
| | | | Closes GH-5758
* Fix Haiku buildDavid Carlier2020-06-191-0/+3
| | | | | | getrusage supports only two fields. The network api sits in the network lib. Closes GH-5732.
* Constify char * arguments of APIstwosee2020-06-081-1/+1
| | | | Closes GH-5676.
* Fix MSVC level 1 (severe) warningsChristoph M. Becker2020-06-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | We fix (hopefully) all instances of: * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4005> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4024> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4028> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4047> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4087> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4090> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4273> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4312> `zend_llist_add_element()` and `zend_llist_prepend_element()` now explicitly expect a *const* pointer. We use the macro `ZEND_VOIDP()` instead of a `(void*)` cast to suppress C4090; this should prevent accidential removal of the cast by clarifying the intention, and makes it easier to remove the casts if the issue[1] will be resolved sometime. [1] <https://developercommunity.visualstudio.com/content/problem/390711/c-compiler-incorrect-propagation-of-const-qualifie.html>
* Merge branch 'PHP-7.4'Christoph M. Becker2020-05-261-4/+8
|\ | | | | | | | | | | | | | | * PHP-7.4: Enable phpdbg tests on AppVeyor Make phpdbg test portable Fix several mostly Windows related phpdbg bugs Fix #73926: phpdbg will not accept input on restart execution
| * Fix several mostly Windows related phpdbg bugsChristoph M. Becker2020-05-261-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Properly initialize PHPDBG_G(watch_tmp) Otherwise that may cause segfaults in ZTS builds. * Deactivate potentially remaining watchpoints after REPL Otherwise the memory could still be protected, resulting in segfaults during shutdown. * NULL zend_handlers_table after freeing As of commit 4130fe4[1], the `zend_handlers_table` is explicitly freed in the `zend_vm_dtor()`. Since phpdbg (and maybe some other SAPIs) may restart the engine afterwards, we have to make sure that the table is also NULLed. * Only set context option if there is a context In other words, we must not follow the null pointer. * Cater to file handles without attached console File handles do not necessarily have an attached console (for instance, pipes do not), in which case `GetConsoleScreenBufferInfo()` fails. In this case we set a default value (`40`) for lines like on other systems. [1] <http://git.php.net/?p=php-src.git;a=commit;h=4130fe437a5db7ead1444d3748bd0fbad9829cb2>
* | Merge branch 'PHP-7.4'Christoph M. Becker2020-05-191-1/+1
|\ \ | |/ | | | | | | * PHP-7.4: Fix INI setting member name
| * Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-05-191-1/+1
| |\ | | | | | | | | | | | | * PHP-7.3: Fix INI setting member name
| | * Fix INI setting member nameChristoph M. Becker2020-05-191-1/+1
| | | | | | | | | | | | | | | | | | Since the member is not used in `OnUpdateEol()` that's not really an issue, but still it's confusing to apparently have two INI settings targeting the same member.
* | | Add stubs for some SAPIsMáté Kocsis2020-05-141-31/+12
| | | | | | | | | | | | | | | For apache2handler, fpm, litespeed, phpdbg, specifically. Partially implements GH-5295
* | | Code tweaks: Remove unneeded semicolonsAlex Dowad2020-04-291-1/+1
| | |
* | | Improve a last couple of argument error messagesMáté Kocsis2020-04-201-1/+1
| | | | | | | | | | | | Closes GH-5404
* | | Fix #78880: Another bunch of spelling errorsMáté Kocsis2020-01-161-2/+2
| | |
* | | Use RETURN_THROWS() during ZPP in main, sapi, win32, and ZendMáté Kocsis2019-12-301-11/+11
| | |
* | | Convert phpdbg arginfo to php stubsCraig Duncan2019-10-291-55/+12
| | | | | | | | | | | | Closes GH-4867.
* | | Small phpdbg cleanupsNikita Popov2019-10-291-6/+16
| | | | | | | | | | | | Add a zpp_none() call, convert E_ERROR to ValueError.
* | | Remove mention of PHP major version in Copyright headersGabriel Caruso2019-09-251-2/+0
|/ / | | | | | | Closes GH-4732.
* | Fix symtable_cache_limit assignment in phpdbgNikita Popov2019-09-141-1/+1
| | | | | | | | | | The meaning of the limit changed in 7.4, it now points one past the end. Adjust code accordingly.
* | Report errors from stream read and write operationsNikita Popov2019-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The php_stream_read() and php_stream_write() functions now return an ssize_t value, with negative results indicating failure. Functions like fread() and fwrite() will return false in that case. As a special case, EWOULDBLOCK and EAGAIN on non-blocking streams should not be regarded as error conditions, and be reported as successful zero-length reads/writes instead. The handling of EINTR remains unclear and is internally inconsistent (e.g. some code-paths will automatically retry on EINTR, while some won't). I'm landing this now to make sure the stream wrapper ops API changes make it into 7.4 -- however, if the user-facing changes turn out to be problematic we have the option of clamping negative returns to zero in php_stream_read() and php_stream_write() to restore the old behavior in a relatively non-intrusive manner.
* | Initialize last_line in phpdbg globalsNikita Popov2019-07-011-0/+1
| |
* | Avoid reliance on arena details on phpdbg oplogNikita Popov2019-06-281-5/+3
| | | | | | | | | | | | Instead of guessing what the address of the first arena allocation is going to be, embed the sentinel in the oplog_list structure directly.
* | implement tsrm_is_shutdown APIJoe Watkins2019-06-281-2/+2
| |
* | Use the portable zend_strndup() instead of strndup()Christoph M. Becker2019-06-281-1/+1
| |
* | Fix phpdbg shutdown orderNikita Popov2019-06-271-24/+25
| | | | | | | | | | | | | | | | In particular, make sure that everything using zmm is released before zmm is shut down. phpdbg currently gets away with this, because either a) its custom handlers are used and no auto-free happens or b) the system allocator is used and no auto-free happens. With the tracking allocator for asan this no longer works.
* | Don't use zmm for PHPDBG_G(exec)Nikita Popov2019-06-271-3/+3
| | | | | | | | | | Uses system allocator when backing up settings ... let's avoid unnecessary confusion.
* | Fix prompt leak in phpdbgNikita Popov2019-06-211-3/+3
| |
* | Register class before fetching parentNikita Popov2019-06-111-3/+3
| | | | | | | | | | We want the class declaration to be available while compiling the parent class.
* | Fix potentially uninitialized warnings in phpdbgNikita Popov2019-04-121-2/+3
| |
* | Implemented a faster way to access predefined TSRM resources - CG(), EG(), etc.Dmitry Stogov2019-03-141-2/+1
| |
* | Avoid reinitailization of ZTS cache pointer. Initialize it once in TSRM.cDmitry Stogov2019-03-121-0/+2
| |
* | Use TSRM macrosDmitry Stogov2019-02-121-1/+2
| |
* | Update and fix remaining year ranges (2019)Peter Kokot2019-02-081-1/+1
| | | | | | | | | | | | This patch follows previous license year ranges updates. With new approach source code files now have simplified headers with license information without year ranges.
* | Remove yearly range from copyright noticeZeev Suraski2019-01-301-1/+1
| |
* | Don't wrap php_module_shutdown() with zend_try. executor_globals are ↵Dmitry Stogov2018-10-251-3/+1
| | | | | | | | released in ZTS build, and this leads to crash.
* | Keep information about unresolved interfaces in ↵Dmitry Stogov2018-08-231-1/+1
| | | | | | | | | | | | | | zend_class_entry->interface_names. Move interface implementation code into ZEND_DECLARE_*CLASS opcodes. Remove ZEND_ADD_INTERFACE and ZEND_VERIFY_ABSTRACT_CLASS opcodes.
* | Replace zend_class_entry->traits by persistent zend_class_entry->trait_names.Dmitry Stogov2018-08-231-1/+1
|/ | | | | Move trait binding code into ZEND_DECLARE_*CLASS opcodes. Remove ZEND_ADD_TRIAIT and ZEND_BIND_TRAITS opcodes.
* Pack zend_constant.flags and zend_constant.module_number into reserved space ↵Dmitry Stogov2018-07-261-6/+3
| | | | inside zend_constant.value.
* Remove duplicated code (keep destroy_zend_function() for compatibility)Dmitry Stogov2018-06-271-2/+1
|
* Merge branch 'PHP-7.2'Christoph M. Becker2018-06-251-3/+3
|\ | | | | | | | | * PHP-7.2: Fix arginfo wrt. optional/required parameters
| * Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-06-251-3/+3
| |\ | | | | | | | | | | | | * PHP-7.1: Fix arginfo wrt. optional/required parameters
| | * Fix arginfo wrt. optional/required parametersChristoph M. Becker2018-06-251-3/+3
| | | | | | | | | | | | | | | All parameters of phpdbg_color(), phpdbg_exec() and phpdbg_prompt() are required. We mark them as such.
* | | Remove useless PHPDBG_* constantsChristoph M. Becker2018-06-251-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | The sole purpose of `PHPDBG_FILE`, `PHPDBG_METHOD`, `PHPDBG_LINENO` and `PHPDBG_FUNC` has been to be passed as first argument to `phpdbg_break`. However, this functions is replaced as of PHP 5.6.3 by `phpdbg_break_file`, `phpdbg_break_method` and 'phpdbg_break_func`, respectively. Therefore, we're finally removing the useless constants.
* | | Merge branch 'PHP-7.2'Thomas Punt2018-04-261-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: Allocate default ini values into persistent memory
| * | Merge branch 'PHP-7.1' into PHP-7.2Thomas Punt2018-04-261-1/+1
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Allocate default ini values into persistent memory
| | * Allocate default ini values into persistent memoryThomas Punt2018-04-261-1/+1
| | |