com php-src: Stepping is now line by line with gdb style command: phpdbg_prompt.c

From: Date: Sun, 20 Apr 2014 14:47:24 +0000
Subject: com php-src: Stepping is now line by line with gdb style command: phpdbg_prompt.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-76979@lists.php.net to get a copy of this message
Commit: e097919f160391c23d93d3ad9a94a505d7c230d8 Author: Bob Weinand <bobwei9@hotmail.com> Sun, 20 Apr 2014 16:47:24 +0200 Parents: d21d5c98a53ddedc3e15d53f8dbe5d71eb06417e Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e097919f160391c23d93d3ad9a94a505d7c230d8 Log: Stepping is now line by line with gdb style command Changed paths: M phpdbg_prompt.c Diff: diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index dcbd2ba..6eb7481 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -43,7 +43,7 @@ int yyparse(phpdbg_param_t *stack, yyscan_t scanner); /* {{{ command declarations */ const phpdbg_command_t phpdbg_prompt_commands[] = { PHPDBG_COMMAND_D(exec, "set execution context", 'e', NULL, "s"), - PHPDBG_COMMAND_D(step, "step through execution", 's', NULL, "b"), + PHPDBG_COMMAND_D(step, "step through execution", 's', NULL, 0), PHPDBG_COMMAND_D(next, "continue execution", 'n', NULL, 0), PHPDBG_COMMAND_D(run, "attempt execution", 'r', NULL, "|s"), PHPDBG_COMMAND_D(ev, "evaluate some code", 0, NULL, "i"), @@ -424,16 +424,9 @@ int phpdbg_compile(TSRMLS_D) /* {{{ */ PHPDBG_COMMAND(step) /* {{{ */ { - if (param->num) { - PHPDBG_G(flags) |= PHPDBG_IS_STEPPING; - } else { - PHPDBG_G(flags) &= ~PHPDBG_IS_STEPPING; - } + PHPDBG_G(flags) |= PHPDBG_IS_STEPPING; - phpdbg_notice("Stepping %s", - (PHPDBG_G(flags) & PHPDBG_IS_STEPPING) ? "on" : "off"); - - return SUCCESS; + return PHPDBG_NEXT; } /* }}} */ PHPDBG_COMMAND(next) /* {{{ */ @@ -1314,6 +1307,11 @@ zend_vm_enter: phpdbg_print_opline_ex( execute_data, &vars, 0 TSRMLS_CC); + if (PHPDBG_G(flags) & PHPDBG_IS_STEPPING && execute_data->opline->lineno != PHPDBG_G(last_line)) { + PHPDBG_G(flags) &= ~PHPDBG_IS_STEPPING; + DO_INTERACTIVE(); + } + /* check if some watchpoint was hit */ { if (phpdbg_print_changed_zvals(TSRMLS_C) == SUCCESS) { @@ -1333,10 +1331,6 @@ zend_vm_enter: } } - if (PHPDBG_G(flags) & PHPDBG_IS_STEPPING) { - DO_INTERACTIVE(); - } - next: if (PHPDBG_G(flags) & PHPDBG_IS_SIGNALED) { phpdbg_writeln(EMPTY);

« previous php.cvs (#76979) next »