by introducing a new "need": VG_(needs_xml_output)().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5854
" 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"
/* 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*/
}
.sanity_checks = False,
.data_syms = False,
.malloc_replacement = False,
+ .xml_output = False,
};
/* static */
NEEDS(libc_freeres)
NEEDS(core_errors)
NEEDS(data_syms)
+NEEDS(xml_output)
void VG_(needs_basic_block_discards)(
void (*discard)(Addr64, VexGuestExtents)
Bool sanity_checks;
Bool data_syms;
Bool malloc_replacement;
+ Bool xml_output;
}
VgNeeds;
<para>When enabled, output will be in XML format. This is aimed
at making life easier for tools that consume Valgrind's output as
input, such as GUI front ends. Currently this option only works
- with Memcheck and Nulgrind.</para>
+ with Memcheck.</para>
</listitem>
</varlistentry>
/* ------------------------------------------------------------------ */
/* Needs */
-/* Booleans that decide core behaviour, but don't require extra
- operations to be defined if `True' */
-
/* Should __libc_freeres() be run? Bugs in it can crash the tool. */
extern void VG_(needs_libc_freeres) ( void );
SizeT client_malloc_redzone_szB
);
+/* Can the tool do XML output? This is a slight misnomer, because the tool
+ * is not requesting the core to do anything, rather saying "I can handle
+ * it". */
+extern void VG_(needs_xml_output)( void );
+
/* ------------------------------------------------------------------ */
/* Core events to track */
VG_(needs_client_requests) (mc_handle_client_request);
VG_(needs_sanity_checks) (mc_cheap_sanity_check,
mc_expensive_sanity_check);
-
VG_(needs_malloc_replacement) (MC_(malloc),
MC_(__builtin_new),
MC_(__builtin_vec_new),
MC_(__builtin_vec_delete),
MC_(realloc),
MC_MALLOC_REDZONE_SZB );
+ VG_(needs_xml_output) ();
VG_(track_new_mem_startup) ( mc_new_mem_startup );
VG_(track_new_mem_stack_signal)( MC_(make_mem_undefined) );
handle non-standard kernel variants
user options for Valgrind tools that report errors:
- --xml=yes all output is in XML (Memcheck/Nulgrind only)
+ --xml=yes all output is in XML (some tools only)
--xml-user-comment=STR copy STR verbatim to XML output
--demangle=no|yes automatically demangle C++ names? [yes]
--num-callers=<number> show <number> callers in stack traces [12]
handle non-standard kernel variants
user options for Valgrind tools that report errors:
- --xml=yes all output is in XML (Memcheck/Nulgrind only)
+ --xml=yes all output is in XML (some tools only)
--xml-user-comment=STR copy STR verbatim to XML output
--demangle=no|yes automatically demangle C++ names? [yes]
--num-callers=<number> show <number> callers in stack traces [12]