]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix a couple of errors in the revised XML generation that were
authorJulian Seward <jseward@acm.org>
Sat, 15 Aug 2009 23:05:34 +0000 (23:05 +0000)
committerJulian Seward <jseward@acm.org>
Sat, 15 Aug 2009 23:05:34 +0000 (23:05 +0000)
spotted by Ashley Pittman:

* If I specify --xml-file=<file> but not --xml=yes I get partial
  output in the xml file.

* Using log file qualifiers with XML results in the xml for the
  qualifier being put to stdout.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10823

coregrind/m_main.c

index 60b8d7530f96be982ecf2828a01f222a4e3504ce..216ce548f7584f54622e155726fb6d64bcb6f391 100644 (file)
@@ -950,10 +950,11 @@ static void print_file_vars(Char* format)
                   i++;
                }
 
-               VG_(message_no_f_c)(Vg_UserMsg,
-                                   "<logfilequalifier> <var>%t</var> "
-                                   "<value>%t</value> </logfilequalifier>\n",
-                                   qualname,qual);
+               VG_(printf_xml_no_f_c)(
+                  "<logfilequalifier> <var>%t</var> "
+                  "<value>%t</value> </logfilequalifier>\n",
+                  qualname,qual
+               );
               format[i] = '}';
               i++;
            }
@@ -2422,7 +2423,8 @@ void shutdown_actions_NORETURN( ThreadId tid,
    VG_TDICT_CALL(tool_fini, 0/*exitcode*/);
 
    /* Show the error counts. */
-   if (VG_(needs).core_errors || VG_(needs).tool_errors) {
+   if (VG_(clo_xml)
+       && (VG_(needs).core_errors || VG_(needs).tool_errors)) {
       VG_(show_error_counts_as_XML)();
    }