{'r', 0, "run"},
{'E', 0, "step-through-eval"},
{'S', 1, "sapi-name"},
-#ifndef _WIN32
{'l', 1, "listen"},
{'a', 1, "address-or-any"},
-#endif
+ {'x', 0, "xml output"},
{'V', 0, "version"},
{'-', 0, NULL}
}; /* }}} */
address = strdup("*");
} else address = strdup(php_optarg);
} break;
-#endif
+ case 'x':
+ flags |= PHPDBG_WRITE_XML;
+ break;
+
case 'V': {
sapi_startup(phpdbg);
phpdbg->startup(phpdbg);
#endif
zend_mm_heap *mm_heap;
-#ifndef _WIN32
/* setup remote server if necessary */
if (!cleaning && listen > 0) {
- if (phpdbg_remote_init(address, listen, &server, &socket, &stream) == FAILURE) {
+ server = phpdbg_open_socket(address, listen);
+ if (phpdbg_remote_init(address, listen, server, &socket, &stream) == FAILURE) {
exit(0);
}
#ifdef _WIN32
} __except(phpdbg_exception_handler_win32(xp = GetExceptionInformation())) {
- phpdbg_error("Access violation (Segementation fault) encountered\ntrying to abort cleanly...");
+ phpdbg_error("segfault", "", "Access violation (Segementation fault) encountered\ntrying to abort cleanly...");
}
-phpdbg_out:
+/* phpdbg_out: */
#endif
-
+
{
int i;
/* free argv */