]> granicus.if.org Git - php/commitdiff
Fix output to wrong function
authorBob Weinand <bobwei9@hotmail.com>
Fri, 24 Oct 2014 10:55:44 +0000 (12:55 +0200)
committerBob Weinand <bobwei9@hotmail.com>
Fri, 24 Oct 2014 10:55:44 +0000 (12:55 +0200)
phpdbg_bp.c
phpdbg_out.h

index 26e6ee297135f0d53ab8350b0b53576a3acf6b8e..81674a0daf10a94cdfab74bbb3e3a3d7279c0346 100644 (file)
@@ -1414,10 +1414,10 @@ PHPDBG_API void phpdbg_print_breakpoints(zend_ulong type TSRMLS_DC) /* {{{ */
                                        case PHPDBG_BREAK_METHOD_OPLINE:
                                        case PHPDBG_BREAK_FUNCTION_OPLINE:
                                        case PHPDBG_BREAK_FILE_OPLINE:
-                                               phpdbg_out("opline", "id=\"%d\" num=\"%#lx\" type=\"%s\" disabled=\"%s\"", "#%d\t\t%#lx\t\t(%s breakpoint)%s", brake->id, brake->opline,
-                                                       brake->type == PHPDBG_BREAK_METHOD_OPLINE?"method":
-                                                               brake->type == PHPDBG_BREAK_FUNCTION_OPLINE?"function":
-                                                                       brake->type == PHPDBG_BREAK_FILE_OPLINE?"file":
+                                               phpdbg_writeln("opline", "id=\"%d\" num=\"%#lx\" type=\"%s\" disabled=\"%s\"", "#%d\t\t%#lx\t\t(%s breakpoint)%s", brake->id, brake->opline,
+                                                       brake->type == PHPDBG_BREAK_METHOD_OPLINE ? "method" :
+                                                               brake->type == PHPDBG_BREAK_FUNCTION_OPLINE ? "function" :
+                                                                       brake->type == PHPDBG_BREAK_FILE_OPLINE ? "file" :
                                                                                "--- error ---",
                                                        ((phpdbg_breakbase_t*)brake)->disabled ? " [disabled]" : "");
                                                break;
index d94fbd73852c085944e435aedc8058cf5a8f9731..ea25b04279d73f0ad99988b2f80a0cb1444d41d4 100644 (file)
@@ -36,16 +36,18 @@ enum {
 
 #ifdef ZTS
 PHPDBG_API int phpdbg_print(int severity TSRMLS_DC, int fd, const char *tag, const char *xmlfmt, const char *strfmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 6, 7);
+PHPDBG_API int phpdbg_xml_internal(int fd TSRMLS_DC, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
+PHPDBG_API int phpdbg_log_internal(int fd TSRMLS_DC, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
+PHPDBG_API int phpdbg_out_internal(int fd TSRMLS_DC, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
+PHPDBG_API int phpdbg_rlog_internal(int fd TSRMLS_DC, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
 #else
-PHPDBG_API int phpdbg_print(int severity TSRMLS_DC, int fd, const char *tag, const char *xmlfmt, const char *strfmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 5, 6);
+PHPDBG_API int phpdbg_print(int severity, int fd, const char *tag, const char *xmlfmt, const char *strfmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 5, 6);
+PHPDBG_API int phpdbg_xml_internal(int fd, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
+PHPDBG_API int phpdbg_log_internal(int fd, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
+PHPDBG_API int phpdbg_out_internal(int fd, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
+PHPDBG_API int phpdbg_rlog_internal(int fd, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
 #endif
 
-PHPDBG_API int phpdbg_xml_internal(int fd TSRMLS_DC, const char *fmt, ...);
-PHPDBG_API int phpdbg_log_internal(int fd TSRMLS_DC, const char *fmt, ...);
-PHPDBG_API int phpdbg_out_internal(int fd TSRMLS_DC, const char *fmt, ...);
-
-PHPDBG_API int phpdbg_rlog_internal(int fd TSRMLS_DC, const char *fmt, ...);
-#define phpdbg_rlog(fd, fmt, ...) phpdbg_rlog_internal(fd TSRMLS_CC, fmt, ##__VA_ARGS__)
 
 #define phpdbg_error(tag, xmlfmt, strfmt, ...)              phpdbg_print(P_ERROR   TSRMLS_CC, PHPDBG_G(io)[PHPDBG_STDOUT].fd, tag,  xmlfmt, strfmt, ##__VA_ARGS__)
 #define phpdbg_notice(tag, xmlfmt, strfmt, ...)             phpdbg_print(P_NOTICE  TSRMLS_CC, PHPDBG_G(io)[PHPDBG_STDOUT].fd, tag,  xmlfmt, strfmt, ##__VA_ARGS__)
@@ -65,6 +67,8 @@ PHPDBG_API int phpdbg_rlog_internal(int fd TSRMLS_DC, const char *fmt, ...);
 #define phpdbg_xml_ex(out, fmt, ...) phpdbg_xml_internal(PHPDBG_G(io)[PHPDBG_STDOUT].fd TSRMLS_CC, fmt, ##__VA_ARGS__)
 #define phpdbg_out_ex(out, fmt, ...) phpdbg_out_internal(PHPDBG_G(io)[PHPDBG_STDOUT].fd TSRMLS_CC, fmt, ##__VA_ARGS__)
 
+#define phpdbg_rlog(fd, fmt, ...) phpdbg_rlog_internal(fd TSRMLS_CC, fmt, ##__VA_ARGS__)
+
 #define phpdbg_xml_asprintf(buf, ...) _phpdbg_xml_asprintf(buf TSRMLS_CC, ##__VA_ARGS__)
 PHPDBG_API int _phpdbg_xml_asprintf(char **buf TSRMLS_DC, const char *format, zend_bool escape_xml, ...);