mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fixed bug #70531 (-rr should not fallback to interactive mode in phpdbg)
This commit is contained in:
parent
4a174ca7e6
commit
bccac3774b
5 changed files with 21 additions and 8 deletions
2
NEWS
2
NEWS
|
@ -30,6 +30,8 @@ PHP NEWS
|
|||
|
||||
- Phpdbg:
|
||||
. Fixed bug #70532 (phpdbg must respect set_exception_handler). (Bob)
|
||||
. Fixed bug #70531 (Run and quit mode (-qrr) should not fallback to
|
||||
interactive mode). (Bob)
|
||||
|
||||
- Session:
|
||||
. Fixed bug #70529 (Session read causes "String is not zero-terminated" error).
|
||||
|
|
|
@ -1835,6 +1835,11 @@ phpdbg_interact:
|
|||
if (phpdbg_startup_run) {
|
||||
quit_immediately = phpdbg_startup_run > 1;
|
||||
phpdbg_startup_run = 0;
|
||||
if (quit_immediately) {
|
||||
PHPDBG_G(flags) |= PHPDBG_IS_INTERACTIVE | PHPDBG_PREVENT_INTERACTIVE;
|
||||
} else {
|
||||
PHPDBG_G(flags) |= PHPDBG_IS_INTERACTIVE;
|
||||
}
|
||||
PHPDBG_COMMAND_HANDLER(run)(NULL);
|
||||
if (quit_immediately) {
|
||||
/* if -r is on the command line more than once just quit */
|
||||
|
|
|
@ -183,16 +183,17 @@ int phpdbg_do_parse(phpdbg_param_t *stack, char *input);
|
|||
#define PHPDBG_IS_INITIALIZING (1ULL<<25)
|
||||
#define PHPDBG_IS_SIGNALED (1ULL<<26)
|
||||
#define PHPDBG_IS_INTERACTIVE (1ULL<<27)
|
||||
#define PHPDBG_IS_BP_ENABLED (1ULL<<28)
|
||||
#define PHPDBG_IS_REMOTE (1ULL<<29)
|
||||
#define PHPDBG_IS_DISCONNECTED (1ULL<<30)
|
||||
#define PHPDBG_WRITE_XML (1ULL<<31)
|
||||
#define PHPDBG_PREVENT_INTERACTIVE (1ULL<<28)
|
||||
#define PHPDBG_IS_BP_ENABLED (1ULL<<29)
|
||||
#define PHPDBG_IS_REMOTE (1ULL<<30)
|
||||
#define PHPDBG_IS_DISCONNECTED (1ULL<<31)
|
||||
#define PHPDBG_WRITE_XML (1ULL<<32)
|
||||
|
||||
#define PHPDBG_SHOW_REFCOUNTS (1ULL<<32)
|
||||
#define PHPDBG_SHOW_REFCOUNTS (1ULL<<33)
|
||||
|
||||
#define PHPDBG_IN_SIGNAL_HANDLER (1ULL<<33)
|
||||
#define PHPDBG_IN_SIGNAL_HANDLER (1ULL<<34)
|
||||
|
||||
#define PHPDBG_DISCARD_OUTPUT (1ULL<<34)
|
||||
#define PHPDBG_DISCARD_OUTPUT (1ULL<<35)
|
||||
|
||||
#define PHPDBG_SEEK_MASK (PHPDBG_IN_UNTIL | PHPDBG_IN_FINISH | PHPDBG_IN_LEAVE)
|
||||
#define PHPDBG_BP_RESOLVE_MASK (PHPDBG_HAS_FUNCTION_OPLINE_BP | PHPDBG_HAS_METHOD_OPLINE_BP | PHPDBG_HAS_FILE_OPLINE_BP)
|
||||
|
|
|
@ -383,7 +383,7 @@ phpdbg_help_text_t phpdbg_help_text[] = {
|
|||
" **-I** Ignore default .phpdbginit" CR
|
||||
" **-O** **-O**my.oplog Sets oplog output file" CR
|
||||
" **-r** Run execution context" CR
|
||||
" **-rr** Run execution context and quit after execution" CR
|
||||
" **-rr** Run execution context and quit after execution (not respecting breakpoints)" CR
|
||||
" **-e** Generate extended information for debugger/profiler" CR
|
||||
" **-E** Enable step through eval, careful!" CR
|
||||
" **-S** **-S**cli Override SAPI name, careful!" CR
|
||||
|
|
|
@ -1476,6 +1476,11 @@ void phpdbg_execute_ex(zend_execute_data *execute_data) /* {{{ */
|
|||
}
|
||||
#endif
|
||||
|
||||
if (PHPDBG_G(flags) & PHPDBG_PREVENT_INTERACTIVE) {
|
||||
phpdbg_print_opline_ex(execute_data, 0);
|
||||
goto next;
|
||||
}
|
||||
|
||||
/* check for uncaught exceptions */
|
||||
if (exception && PHPDBG_G(handled_exception) != exception && !(PHPDBG_G(flags) & PHPDBG_IN_EVAL)) {
|
||||
zend_execute_data *prev_ex = execute_data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue