]> granicus.if.org Git - php/commitdiff
Fix oplog...
authorBob Weinand <bobwei9@hotmail.com>
Sat, 19 Sep 2015 15:10:01 +0000 (17:10 +0200)
committerBob Weinand <bobwei9@hotmail.com>
Sat, 19 Sep 2015 15:10:16 +0000 (17:10 +0200)
sapi/phpdbg/phpdbg.c
sapi/phpdbg/phpdbg_opcode.c
sapi/phpdbg/phpdbg_out.h

index 2d3a97a1a84302f887dee1db89b7b272ce4ca193..de87242e448c22471f0849419ec63b47185f8384 100644 (file)
@@ -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 */
index d8e8ebf1cee515001af9092a75991d274d617527..44170c8c9ed910fa8af1b92d4243fbc5097a412f 100644 (file)
@@ -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,
index 74bbbad980fa0e0de4f50a23c0841369a4087eb8..30435718eda6a74c1ad9db6fd9cb3ee4ce0a96ec 100644 (file)
@@ -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__)