PHP_INI_END()
static zend_bool phpdbg_booted = 0;
+static zend_bool phpdbg_fully_started = 0;
#if PHP_VERSION_ID >= 50500
void (*zend_execute_old)(zend_execute_data *execute_data);
phpdbg_list_file(file, 3, zend_get_executed_lineno() - 1, zend_get_executed_lineno());
efree(file);
+ if (!phpdbg_fully_started) {
+ return;
+ }
+
do {
switch (phpdbg_interactive(1)) {
case PHPDBG_LEAVE:
if (settings) {
PHPDBG_G(flags) |= PHPDBG_DISCARD_OUTPUT;
}
- phpdbg_compile();
+
+ zend_try {
+ phpdbg_compile();
+ } zend_end_try();
+
PHPDBG_G(flags) &= ~PHPDBG_DISCARD_OUTPUT;
}
PHPDBG_G(flags) |= PHPDBG_IS_STEPPING;
}
+ phpdbg_fully_started = 1;
+
/* #ifndef for making compiler shutting up */
#ifndef _WIN32
phpdbg_interact:
--- /dev/null
+#################################################
+# name: compile
+# purpose: test compiling error code
+# expect: TEST::FORMAT
+# options: -rr
+#################################################
+#[PHP Parse error: syntax error, unexpected 'echo' (T_ECHO) in %s on line %s]
+#[Could not find information about included file...]
+#################################################
+<:
+define('OUT',
+ tempnam(null, "phpdbg"));
+file_put_contents(OUT, "<?error echo \"Hello World\"; ?>");
+phpdbg_exec(OUT);
+:>
+run
+quit