Remove tool-specific code (which says which tools allow XML) from the core
by introducing a new "need": VG_(needs_xml_output)().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5854 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_main.c b/coregrind/m_main.c
index bc0b591..8b5a1d3 100644
--- a/coregrind/m_main.c
+++ b/coregrind/m_main.c
@@ -912,7 +912,7 @@
" handle non-standard kernel variants\n"
"\n"
" user options for Valgrind tools that report errors:\n"
-" --xml=yes all output is in XML (Memcheck/Nulgrind only)\n"
+" --xml=yes all output is in XML (some tools only)\n"
" --xml-user-comment=STR copy STR verbatim to XML output\n"
" --demangle=no|yes automatically demangle C++ names? [yes]\n"
" --num-callers=<number> show <number> callers in stack traces [12]\n"
@@ -1457,11 +1457,10 @@
/* Check that the requested tool actually supports XML output. */
- if (VG_(clo_xml) && !VG_STREQ(toolname, "memcheck")
- && !VG_STREQ(toolname, "none")) {
+ if (VG_(clo_xml) && !VG_(needs).xml_output) {
VG_(clo_xml) = False;
VG_(message)(Vg_UserMsg,
- "Currently only Memcheck|None supports XML output.");
+ "%s does not support XML output.", VG_(details).name);
VG_(bad_option)("--xml=yes");
/*NOTREACHED*/
}