diff options
-rw-r--r-- | sapi/phpdbg/phpdbg.c | 4 | ||||
-rw-r--r-- | sapi/phpdbg/phpdbg.h | 2 | ||||
-rw-r--r-- | sapi/phpdbg/phpdbg_help.c | 2 | ||||
-rw-r--r-- | sapi/phpdbg/phpdbg_prompt.c | 2 | ||||
-rw-r--r-- | sapi/phpdbg/phpdbg_rinit_hook.c | 2 | ||||
-rw-r--r-- | sapi/phpdbg/phpdbg_wait.c | 2 |
6 files changed, 12 insertions, 2 deletions
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index 7ca7997297..6ee41b7586 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -779,7 +779,9 @@ const opt_struct OPTIONS[] = { /* {{{ */ {'S', 1, "sapi-name"}, {'l', 1, "listen"}, {'a', 1, "address-or-any"}, +#if PHPDBG_IN_DEV {'x', 0, "xml output"}, +#endif {'V', 0, "version"}, {'-', 0, NULL} }; /* }}} */ @@ -1213,8 +1215,10 @@ phpdbg_main: } else address = strdup(php_optarg); } break; +#if PHPDBG_IN_DEV case 'x': flags |= PHPDBG_WRITE_XML; +#endif break; case 'V': { diff --git a/sapi/phpdbg/phpdbg.h b/sapi/phpdbg/phpdbg.h index a9be80436e..a0ba75e4d4 100644 --- a/sapi/phpdbg/phpdbg.h +++ b/sapi/phpdbg/phpdbg.h @@ -21,6 +21,8 @@ #ifndef PHPDBG_H #define PHPDBG_H +#define PHPDBG_IN_DEV 0 + #ifdef PHP_WIN32 # define PHPDBG_API __declspec(dllexport) #elif defined(__GNUC__) && __GNUC__ >= 4 diff --git a/sapi/phpdbg/phpdbg_help.c b/sapi/phpdbg/phpdbg_help.c index 652e170694..d47f8c776a 100644 --- a/sapi/phpdbg/phpdbg_help.c +++ b/sapi/phpdbg/phpdbg_help.c @@ -388,7 +388,9 @@ phpdbg_help_text_t phpdbg_help_text[] = { " **-S** **-S**cli Override SAPI name, careful!" CR " **-l** **-l**4000 Setup remote console ports" CR " **-a** **-a**192.168.0.3 Setup remote console bind address" CR +#if PHPDBG_IN_DEV " **-x** Enable xml output (instead of normal text output)" CR +#endif " **-V** Print version number" CR " **--** **--** arg1 arg2 Use to delimit phpdbg arguments and php $argv; append any $argv " "argument after it" CR CR diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index 915bccfa69..f030654f3b 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -82,7 +82,9 @@ const phpdbg_command_t phpdbg_prompt_commands[] = { PHPDBG_COMMAND_D(export, "export breaks to a .phpdbginit script", '>', NULL, "s", PHPDBG_ASYNC_SAFE), PHPDBG_COMMAND_D(sh, "shell a command", 0 , NULL, "i", 0), PHPDBG_COMMAND_D(quit, "exit phpdbg", 'q', NULL, 0, PHPDBG_ASYNC_SAFE), +#if PHPDBG_IN_DEV PHPDBG_COMMAND_D(wait, "wait for other process", 'W', NULL, 0, 0), +#endif PHPDBG_COMMAND_D(watch, "set watchpoint", 'w', phpdbg_watch_commands, "|ss", 0), PHPDBG_COMMAND_D(eol, "set EOL", 'E', NULL, "|s", 0), PHPDBG_END_COMMAND diff --git a/sapi/phpdbg/phpdbg_rinit_hook.c b/sapi/phpdbg/phpdbg_rinit_hook.c index acbdfb6f25..11bd5c99b1 100644 --- a/sapi/phpdbg/phpdbg_rinit_hook.c +++ b/sapi/phpdbg/phpdbg_rinit_hook.c @@ -52,7 +52,7 @@ static PHP_RINIT_FUNCTION(phpdbg_webhelper) /* {{{ */ return SUCCESS; } -#ifndef _WIN32 +#if PHPDBG_IN_DEV { struct sockaddr_un sock; int s = socket(AF_UNIX, SOCK_STREAM, 0); diff --git a/sapi/phpdbg/phpdbg_wait.c b/sapi/phpdbg/phpdbg_wait.c index 6f9eea90e3..180ae6af3d 100644 --- a/sapi/phpdbg/phpdbg_wait.c +++ b/sapi/phpdbg/phpdbg_wait.c @@ -365,7 +365,7 @@ void phpdbg_webdata_decompress(char *msg, int len TSRMLS_DC) { PHPDBG_COMMAND(wait) /* {{{ */ { -#ifndef PHP_WIN32 +#if PHPDBG_IN_DEV struct sockaddr_un local, remote; int rlen, sr, sl; unlink(PHPDBG_G(socket_path)); |