com php-src: fix stepping into code from command line: phpdbg.c phpdbg.h
| From: | Bob Weinand | Date: | Wed, 20 Nov 2013 16:50:12 +0000 |
| Subject: | com php-src: fix stepping into code from command line: phpdbg.c phpdbg.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-74750@lists.php.net to get a copy of this message | ||
Commit: 311c22277d7b91ce5a9bd915efc22f5706acbc5a
Author: krakjoe <joe.watkins@live.co.uk> Wed, 20 Nov 2013 16:50:12 +0000
Parents: 3e8235e988b445c7c8aa0a0e363725ace1a7d0a2
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=311c22277d7b91ce5a9bd915efc22f5706acbc5a
Log:
fix stepping into code from command line
Changed paths:
M phpdbg.c
M phpdbg.h
Diff:
diff --git a/phpdbg.c b/phpdbg.c
index 5e9432e..9c3ca38 100644
--- a/phpdbg.c
+++ b/phpdbg.c
@@ -452,6 +452,8 @@ int main(int argc, char **argv) /* {{{ */
int php_optind, opt, show_banner = 1;
long cleaning = 0;
int run = 0;
+ int step = 0;
+
#ifdef ZTS
void ***tsrm_ls;
#endif
@@ -484,6 +486,7 @@ phpdbg_main:
php_optind = 1;
opt = 0;
run = 0;
+ step = 0;
while ((opt = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 0, 2)) != -1) {
switch (opt) {
@@ -564,7 +567,7 @@ phpdbg_main:
break;
case 's': /* set stepping on */
- flags |= PHPDBG_IS_STEPPING;
+ step = 1;
break;
case 'b': /* set colours off */
@@ -653,6 +656,11 @@ phpdbg_main:
}
} zend_end_try();
+ /* step from here, not through init */
+ if (step) {
+ PHPDBG_G(flags) |= PHPDBG_IS_STEPPING;
+ }
+
if (run) {
/* no need to try{}, run does it ... */
PHPDBG_COMMAND_HANDLER(run)(NULL, NULL TSRMLS_CC);
diff --git a/phpdbg.h b/phpdbg.h
index 889639a..2f99543 100644
--- a/phpdbg.h
+++ b/phpdbg.h
@@ -97,6 +97,7 @@
#define PHPDBG_SEEK_MASK (PHPDBG_IN_UNTIL|PHPDBG_IN_FINISH|PHPDBG_IN_LEAVE)
#define PHPDBG_IS_REGISTERED (1<<16)
+#define PHPDBG_IS_STEPONEVAL (1<<17)
#ifndef _WIN32
# define PHPDBG_DEFAULT_FLAGS (PHPDBG_IS_QUIET|PHPDBG_IS_COLOURED)