summaryrefslogtreecommitdiff
path: root/phpdbg.c
diff options
context:
space:
mode:
Diffstat (limited to 'phpdbg.c')
-rw-r--r--phpdbg.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/phpdbg.c b/phpdbg.c
index 8a2369de18..72478e0535 100644
--- a/phpdbg.c
+++ b/phpdbg.c
@@ -38,6 +38,8 @@ void (*zend_execute_old)(zend_op_array *op_array TSRMLS_DC);
static inline void php_phpdbg_globals_ctor(zend_phpdbg_globals *pg) /* {{{ */
{
pg->prompt = NULL;
+ pg->prompt_raw = NULL;
+ pg->prompt_color = NULL;
pg->exec = NULL;
pg->exec_len = 0;
pg->ops = NULL;
@@ -154,6 +156,16 @@ static PHP_RSHUTDOWN_FUNCTION(phpdbg) /* {{{ */
PHPDBG_G(prompt) = NULL;
}
+ if (PHPDBG_G(prompt_raw)) {
+ efree(PHPDBG_G(prompt_raw));
+ PHPDBG_G(prompt_raw) = NULL;
+ }
+
+ if (PHPDBG_G(prompt_color)) {
+ efree(PHPDBG_G(prompt_color));
+ PHPDBG_G(prompt_color) = NULL;
+ }
+
if (PHPDBG_G(oplog)) {
fclose(
PHPDBG_G(oplog));
@@ -687,7 +699,7 @@ phpdbg_main:
PHPDBG_G(flags) = flags;
/* set default prompt */
- phpdbg_set_prompt(PROMPT TSRMLS_CC);
+ phpdbg_set_prompt(PROMPT, "1;64" TSRMLS_CC);
zend_try {
zend_activate_modules(TSRMLS_C);