From: Julian Seward Date: Sat, 15 Aug 2009 23:05:34 +0000 (+0000) Subject: Fix a couple of errors in the revised XML generation that were X-Git-Tag: svn/VALGRIND_3_5_0~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b9ddd9604962295759c17bcff92bfcfd43d1249;p=thirdparty%2Fvalgrind.git Fix a couple of errors in the revised XML generation that were spotted by Ashley Pittman: * If I specify --xml-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 --- diff --git a/coregrind/m_main.c b/coregrind/m_main.c index 60b8d7530f..216ce548f7 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -950,10 +950,11 @@ static void print_file_vars(Char* format) i++; } - VG_(message_no_f_c)(Vg_UserMsg, - " %t " - "%t \n", - qualname,qual); + VG_(printf_xml_no_f_c)( + " %t " + "%t \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)(); }