From 4b9ddd9604962295759c17bcff92bfcfd43d1249 Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Sat, 15 Aug 2009 23:05:34 +0000 Subject: [PATCH] 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 --- coregrind/m_main.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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)(); } -- 2.47.2