RE: [PHP-CVS] com php-src: phpdbg next command must stop when leaving function: NEWS sapi/phpdbg/phpdbg_prompt.c sapi/phpdbg/tests/next_001.phpt
| From: | Anatol Belski | Date: | Fri, 23 Sep 2016 09:59:43 +0000 |
| Subject: | RE: [PHP-CVS] com php-src: phpdbg next command must stop when leaving function: NEWS sapi/phpdbg/phpdbg_prompt.c sapi/phpdbg/tests/next_001.phpt | ||
| References: | 1 2 3 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-94636@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Bob Weinand [mailto:bobwei9@hotmail.com]
> Sent: Friday, September 23, 2016 11:50 AM
> To: Anatol Belski <anatol.php@belski.net>
> Cc: php-cvs@lists.php.net
> Subject: Re: [PHP-CVS] com php-src: phpdbg next command must stop when
> leaving function: NEWS sapi/phpdbg/phpdbg_prompt.c
> sapi/phpdbg/tests/next_001.phpt
>
> Hey,
>
> no, it wasn’t intentional, I’m just not used enough to the new workflow
> including 7.1 too.
>
> Going to merge in a second…
>
Ah, fine then. I was merging another thing where I realized it was dragging your commit along into
7.1. So the commit itself should be merged already, you probably only should update the NEWS.
Regards
Anatol
> Thanks,
> Bob
>
> > Am 23.9.2016 um 11:00 schrieb Anatol Belski <anatol.php@belski.net>:
> >
> > Hi Bob,
> >
> >> -----Original Message-----
> >> From: Bob Weinand [mailto:bwoebi@php.net]
> >> Sent: Friday, September 23, 2016 3:30 AM
> >> To: php-cvs@lists.php.net
> >> Subject: [PHP-CVS] com php-src: phpdbg next command must stop when
> >> leaving
> >> function: NEWS sapi/phpdbg/phpdbg_prompt.c
> >> sapi/phpdbg/tests/next_001.phpt
> >>
> >> Commit: cf35dae6e22da6b06d130630abd024e285939a2e
> >> Author: Bob Weinand <bobwei9@hotmail.com> Fri, 23 Sep 2016
> 03:29:37
> >> +0200
> >> Parents: 54d8053ac5008efa122211b2aeec57a4931f5d56
> >> Branches: PHP-7.0
> >>
> > This commit is not merged into 7.1. Is it intentional?
> >
> > Regards
> >
> > Anatol
> >
> >> Link: http://git.php.net/?p=php-
> >> src.git;a=commitdiff;h=cf35dae6e22da6b06d130630abd024e285939a2e
> >>
> >> Log:
> >> phpdbg next command must stop when leaving function
> >>
> >> Changed paths:
> >> M NEWS
> >> M sapi/phpdbg/phpdbg_prompt.c
> >> A sapi/phpdbg/tests/next_001.phpt
> >>
> >>
> >> Diff:
> >> diff --git a/NEWS b/NEWS
> >> index b16eb2d..e794a98 100644
> >> --- a/NEWS
> >> +++ b/NEWS
> >> @@ -60,6 +60,7 @@ PHP
> >> NEWS
> >>
> >> - phpdbg:
> >> . Fixed bug #72996 (phpdbg_prompt.c undefined reference to DL_LOAD).
> >> (Nikita)
> >> + . Fixed next command not stopping when leaving function. (Bob)
> >>
> >> - Session:
> >> . Fixed bug #68015 (Session does not report invalid uid for files save handler).
> >> diff --git a/sapi/phpdbg/phpdbg_prompt.c
> >> b/sapi/phpdbg/phpdbg_prompt.c index 7115d8d..fb935c3 100644
> >> --- a/sapi/phpdbg/phpdbg_prompt.c
> >> +++ b/sapi/phpdbg/phpdbg_prompt.c
> >> @@ -1541,12 +1541,18 @@ ex_is_caught:
> >> goto next;
> >> }
> >>
> >> + /* not while in conditionals */
> >> + phpdbg_print_opline_ex(execute_data, 0);
> >> +
> >> /* perform seek operation */
> >> if ((PHPDBG_G(flags) & PHPDBG_SEEK_MASK)
> && !(PHPDBG_G(flags) &
> >> PHPDBG_IN_EVAL)) {
> >> /* current address */
> >> zend_ulong address = (zend_ulong) execute_data-
> >>> opline;
> >>
> >> if (PHPDBG_G(seek_ex) != execute_data) {
> >> + if (PHPDBG_G(flags) & PHPDBG_IS_STEPPING) {
> >> + goto stepping;
> >> + }
> >> goto next;
> >> }
> >>
> >> @@ -1590,10 +1596,8 @@ ex_is_caught:
> >> }
> >> }
> >>
> >> - /* not while in conditionals */
> >> - phpdbg_print_opline_ex(execute_data, 0);
> >> -
> >> if (PHPDBG_G(flags) & PHPDBG_IS_STEPPING &&
> >> (PHPDBG_G(flags) & PHPDBG_STEP_OPCODE || execute_data->opline-
> >>> lineno != PHPDBG_G(last_line))) {
> >> +stepping:
> >> PHPDBG_G(flags) &= ~PHPDBG_IS_STEPPING;
> >> DO_INTERACTIVE(1);
> >> }
> >> diff --git a/sapi/phpdbg/tests/next_001.phpt
> >> b/sapi/phpdbg/tests/next_001.phpt new file mode 100644 index
> >> 0000000..3c92ceb
> >> --- /dev/null
> >> +++ b/sapi/phpdbg/tests/next_001.phpt
> >> @@ -0,0 +1,37 @@
> >> +--TEST--
> >> +Test next command on function boundaries
> >> +--PHPDBG--
> >> +b 4
> >> +r
> >> +n
> >> +
> >> +
> >> +q
> >> +--EXPECTF--
> >> +[Successful compilation of %s]
> >> +prompt> [Breakpoint #0 added at %s:4] [Breakpoint #0 at %s:4, hits:
> >> +prompt> 1]
> >> +>00004: echo 0;
> >> + 00005: }
> >> + 00006:
> >> +prompt> 0
> >> +[L5 %s RETURN null
> >> %s]
> >> +>00005: }
> >> + 00006:
> >> + 00007: foo();
> >> +prompt> [L8 %s ECHO 1
> >> %s]
> >> +>00008: echo 1;
> >> + 00009:
> >> +prompt> 1
> >> +[L8 %s RETURN 1
> >> %s]
> >> +[Script ended normally]
> >> +prompt>
> >> +--FILE--
> >> +<?php
> >> +
> >> +function foo() {
> >> + echo 0;
> >> +}
> >> +
> >> +foo();
> >> +echo 1;
> >>
> >>
> >> --
> >> PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit:
> >> http://www.php.net/unsub.php
> >
>
>
>
> Bob
>
>
>