com php-src: Fix oplog...: sapi/phpdbg/phpdbg.c sapi/phpdbg/php dbg_opcode.c sapi/phpdbg/phpdbg_out.h
| From: | Bob Weinand | Date: | Sat, 19 Sep 2015 15:10:16 +0000 |
| Subject: | com php-src: Fix oplog...: sapi/phpdbg/phpdbg.c sapi/phpdbg/php dbg_opcode.c sapi/phpdbg/phpdbg_out.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-89076@lists.php.net to get a copy of this message | ||
Commit: 16cde23eb24e3675219352dcf970c311c3f7fb40
Author: Bob Weinand <bobwei9@hotmail.com> Sat, 19 Sep 2015 17:10:01 +0200
Parents: ff414555db30bcddb09b4f035ddd02a7411d39b4
Branches: PHP-7.0
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=16cde23eb24e3675219352dcf970c311c3f7fb40
Log:
Fix oplog...
Changed paths:
M sapi/phpdbg/phpdbg.c
M sapi/phpdbg/phpdbg_opcode.c
M sapi/phpdbg/phpdbg_out.h
Diff:
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
index 2d3a97a..de87242 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 d8e8ebf..44170c8 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 74bbbad..3043571 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__)