summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2015-09-19 17:10:01 +0200
committerBob Weinand <bobwei9@hotmail.com>2015-09-19 17:10:16 +0200
commit16cde23eb24e3675219352dcf970c311c3f7fb40 (patch)
treea0626c5b46d89b9623fda44ce9452bed1ae1cca7
parentff414555db30bcddb09b4f035ddd02a7411d39b4 (diff)
downloadphp-git-16cde23eb24e3675219352dcf970c311c3f7fb40.tar.gz
Fix oplog...
-rw-r--r--sapi/phpdbg/phpdbg.c1
-rw-r--r--sapi/phpdbg/phpdbg_opcode.c2
-rw-r--r--sapi/phpdbg/phpdbg_out.h6
3 files changed, 5 insertions, 4 deletions
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
index 2d3a97a1a8..de87242e44 100644
--- a/sapi/phpdbg/phpdbg.c
+++ b/sapi/phpdbg/phpdbg.c
@@ -1752,6 +1752,7 @@ phpdbg_main:
phpdbg_error("oplog", "path=\"%s\"", "Failed to open oplog %s", oplog_file);
}
free(oplog_file);
+ oplog_file = NULL;
}
/* set default colors */
diff --git a/sapi/phpdbg/phpdbg_opcode.c b/sapi/phpdbg/phpdbg_opcode.c
index d8e8ebf1ce..44170c8c9e 100644
--- a/sapi/phpdbg/phpdbg_opcode.c
+++ b/sapi/phpdbg/phpdbg_opcode.c
@@ -190,7 +190,7 @@ void phpdbg_print_opline_ex(zend_execute_data *execute_data, zend_bool ignore_fl
}
if (!ignore_flags && PHPDBG_G(oplog)) {
- phpdbg_log_ex(fileno(PHPDBG_G(oplog)), "L%-5u %16p %s %s",
+ phpdbg_log_ex(fileno(PHPDBG_G(oplog)), "L%-5u %16p %s %s\n",
opline->lineno,
opline,
decode,
diff --git a/sapi/phpdbg/phpdbg_out.h b/sapi/phpdbg/phpdbg_out.h
index 74bbbad980..30435718ed 100644
--- a/sapi/phpdbg/phpdbg_out.h
+++ b/sapi/phpdbg/phpdbg_out.h
@@ -63,9 +63,9 @@ PHPDBG_API int phpdbg_rlog_internal(int fd, const char *fmt, ...) PHP_ATTRIBUTE_
#define phpdbg_writeln_ex(out, tag, xmlfmt, strfmt, ...) phpdbg_print(P_WRITELN, out, tag, xmlfmt, strfmt, ##__VA_ARGS__)
#define phpdbg_write_ex(out, tag, xmlfmt, strfmt, ...) phpdbg_print(P_WRITE , out, tag, xmlfmt, strfmt, ##__VA_ARGS__)
#define phpdbg_script_ex(out, type, fmt, ...) phpdbg_print(type , out, NULL, NULL, fmt, ##__VA_ARGS__)
-#define phpdbg_log_ex(out, fmt, ...) phpdbg_log_internal(PHPDBG_G(io)[PHPDBG_STDOUT].fd, fmt, ##__VA_ARGS__)
-#define phpdbg_xml_ex(out, fmt, ...) phpdbg_xml_internal(PHPDBG_G(io)[PHPDBG_STDOUT].fd, fmt, ##__VA_ARGS__)
-#define phpdbg_out_ex(out, fmt, ...) phpdbg_out_internal(PHPDBG_G(io)[PHPDBG_STDOUT].fd, fmt, ##__VA_ARGS__)
+#define phpdbg_log_ex(out, fmt, ...) phpdbg_log_internal(out, fmt, ##__VA_ARGS__)
+#define phpdbg_xml_ex(out, fmt, ...) phpdbg_xml_internal(out, fmt, ##__VA_ARGS__)
+#define phpdbg_out_ex(out, fmt, ...) phpdbg_out_internal(out, fmt, ##__VA_ARGS__)
#define phpdbg_rlog(fd, fmt, ...) phpdbg_rlog_internal(fd, fmt, ##__VA_ARGS__)