*q++ = '\0';
if ((q-new)>size) {
- phpdbg_error("help", "overrun=\"%lu\"", "Output overrun of %lu bytes", ((q-new) - size));
+ phpdbg_error("help", "overrun=\"%lu\"", "Output overrun of %lu bytes", ((q - new) - size));
}
- phpdbg_out("%s", new);
+ phpdbg_out("%s\n", new);
efree(new);
} /* }}} */
" **-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
+" **-x** Enable xml output (instead of normal text output)" CR
" **-V** Print version number" CR
" **--** **--** arg1 arg2 Use to delimit phpdbg arguments and php $argv; append any $argv "
"argument after it" CR CR
PHPDBG_G(err_buf).tag = estrdup(tag);
PHPDBG_G(err_buf).msg = msg;
PHPDBG_G(err_buf).msglen = msglen;
- PHPDBG_G(err_buf).xml = xml;
- PHPDBG_G(err_buf).xmllen = xmllen;
+ if (PHPDBG_G(flags) & PHPDBG_WRITE_XML) {
+ PHPDBG_G(err_buf).xml = xml;
+ PHPDBG_G(err_buf).xmllen = xmllen;
+ }
return msglen;
}
efree(PHPDBG_G(err_buf).tag);
efree(PHPDBG_G(err_buf).msg);
- efree(PHPDBG_G(err_buf).xml);
+ if (PHPDBG_G(flags) & PHPDBG_WRITE_XML) {
+ efree(PHPDBG_G(err_buf).xml);
+ }
}
PHPDBG_API void phpdbg_activate_err_buf(zend_bool active TSRMLS_DC) {