summaryrefslogtreecommitdiff
path: root/phpdbg.c
diff options
context:
space:
mode:
authorkrakjoe <joe.watkins@live.co.uk>2014-01-17 21:08:35 +0000
committerkrakjoe <joe.watkins@live.co.uk>2014-01-17 21:08:35 +0000
commit54fa2883f0be3f4ac3e9faab77434e1833bbae5c (patch)
tree37504820c537243f6ba66bac88fb8e9e8175b82c /phpdbg.c
parent837bd24dea5c32dc186a1fe484c2c276e97e92e1 (diff)
downloadphp-git-54fa2883f0be3f4ac3e9faab77434e1833bbae5c.tar.gz
remove goto from zend_try/zend_end_try/zend_catch blocks
Diffstat (limited to 'phpdbg.c')
-rw-r--r--phpdbg.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/phpdbg.c b/phpdbg.c
index 1e69e4bdbf..8225a90125 100644
--- a/phpdbg.c
+++ b/phpdbg.c
@@ -1202,17 +1202,17 @@ phpdbg_main:
} zend_end_try();
/* initialize from file */
+ PHPDBG_G(flags) |= PHPDBG_IS_INITIALIZING;
zend_try {
- PHPDBG_G(flags) |= PHPDBG_IS_INITIALIZING;
phpdbg_init(init_file, init_file_len, init_file_default TSRMLS_CC);
phpdbg_try_file_init(bp_tmp_file, strlen(bp_tmp_file), 0 TSRMLS_CC);
- PHPDBG_G(flags) &= ~PHPDBG_IS_INITIALIZING;
- } zend_catch {
- PHPDBG_G(flags) &= ~PHPDBG_IS_INITIALIZING;
- if (PHPDBG_G(flags) & PHPDBG_IS_QUITTING) {
- goto phpdbg_out;
- }
} zend_end_try();
+ PHPDBG_G(flags) &= ~PHPDBG_IS_INITIALIZING;
+
+ /* quit if init says so */
+ if (PHPDBG_G(flags) & PHPDBG_IS_QUITTING) {
+ goto phpdbg_out;
+ }
/* step from here, not through init */
if (step) {
@@ -1239,7 +1239,6 @@ phpdbg_interact:
phpdbg_export_breakpoints(bp_tmp_fp TSRMLS_CC);
fclose(bp_tmp_fp);
cleaning = 1;
- goto phpdbg_out;
} else {
cleaning = 0;
}
@@ -1265,11 +1264,8 @@ phpdbg_interact:
}
}
#endif
- if (PHPDBG_G(flags) & PHPDBG_IS_QUITTING) {
- goto phpdbg_out;
- }
} zend_end_try();
- } while(!(PHPDBG_G(flags) & PHPDBG_IS_QUITTING));
+ } while(!cleaning && !(PHPDBG_G(flags) & PHPDBG_IS_QUITTING));
/* this must be forced */
CG(unclean_shutdown) = 0;