|
From: <sv...@va...> - 2006-04-16 10:25:57
|
Author: njn
Date: 2006-04-16 11:25:43 +0100 (Sun, 16 Apr 2006)
New Revision: 5854
Log:
Remove tool-specific code (which says which tools allow XML) from the cor=
e
by introducing a new "need": VG_(needs_xml_output)().
Modified:
trunk/coregrind/m_main.c
trunk/coregrind/m_tooliface.c
trunk/coregrind/pub_core_tooliface.h
trunk/docs/xml/manual-core.xml
trunk/include/pub_tool_tooliface.h
trunk/memcheck/mc_main.c
trunk/none/tests/cmdline1.stdout.exp
trunk/none/tests/cmdline2.stdout.exp
Modified: trunk/coregrind/m_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_main.c 2006-04-16 00:13:22 UTC (rev 5853)
+++ trunk/coregrind/m_main.c 2006-04-16 10:25:43 UTC (rev 5854)
@@ -912,7 +912,7 @@
" handle non-standard kernel variants\n"
"\n"
" user options for Valgrind tools that report errors:\n"
-" --xml=3Dyes all output is in XML (Memcheck/Nulgrind=
only)\n"
+" --xml=3Dyes all output is in XML (some tools only)\=
n"
" --xml-user-comment=3DSTR copy STR verbatim to XML output\n"
" --demangle=3Dno|yes automatically demangle C++ names? [yes]=
\n"
" --num-callers=3D<number> show <number> callers in stack traces [=
12]\n"
@@ -1457,11 +1457,10 @@
=20
=20
/* 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) =3D False;
VG_(message)(Vg_UserMsg,=20
- "Currently only Memcheck|None supports XML output.");=20
+ "%s does not support XML output.", VG_(details).name);=20
VG_(bad_option)("--xml=3Dyes");
/*NOTREACHED*/
}
Modified: trunk/coregrind/m_tooliface.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_tooliface.c 2006-04-16 00:13:22 UTC (rev 5853)
+++ trunk/coregrind/m_tooliface.c 2006-04-16 10:25:43 UTC (rev 5854)
@@ -93,6 +93,7 @@
.sanity_checks =3D False,
.data_syms =3D False,
.malloc_replacement =3D False,
+ .xml_output =3D False,
};
=20
/* static */
@@ -161,6 +162,7 @@
NEEDS(libc_freeres)
NEEDS(core_errors)
NEEDS(data_syms)
+NEEDS(xml_output)
=20
void VG_(needs_basic_block_discards)(
void (*discard)(Addr64, VexGuestExtents)
Modified: trunk/coregrind/pub_core_tooliface.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/pub_core_tooliface.h 2006-04-16 00:13:22 UTC (rev 585=
3)
+++ trunk/coregrind/pub_core_tooliface.h 2006-04-16 10:25:43 UTC (rev 585=
4)
@@ -90,6 +90,7 @@
Bool sanity_checks;
Bool data_syms;
Bool malloc_replacement;
+ Bool xml_output;
}=20
VgNeeds;
=20
Modified: trunk/docs/xml/manual-core.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/docs/xml/manual-core.xml 2006-04-16 00:13:22 UTC (rev 5853)
+++ trunk/docs/xml/manual-core.xml 2006-04-16 10:25:43 UTC (rev 5854)
@@ -766,7 +766,7 @@
<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>
=20
Modified: trunk/include/pub_tool_tooliface.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/pub_tool_tooliface.h 2006-04-16 00:13:22 UTC (rev 5853)
+++ trunk/include/pub_tool_tooliface.h 2006-04-16 10:25:43 UTC (rev 5854)
@@ -138,9 +138,6 @@
/* ------------------------------------------------------------------ */
/* Needs */
=20
-/* 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 );
=20
@@ -299,6 +296,11 @@
SizeT client_malloc_redzone_szB
);
=20
+/* Can the tool do XML output? This is a slight misnomer, because the t=
ool
+ * is not requesting the core to do anything, rather saying "I can handl=
e
+ * it". */
+extern void VG_(needs_xml_output)( void );
+
/* ------------------------------------------------------------------ */
/* Core events to track */
=20
Modified: trunk/memcheck/mc_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/mc_main.c 2006-04-16 00:13:22 UTC (rev 5853)
+++ trunk/memcheck/mc_main.c 2006-04-16 10:25:43 UTC (rev 5854)
@@ -4330,7 +4330,6 @@
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),
@@ -4341,6 +4340,7 @@
MC_(__builtin_vec_delete),
MC_(realloc),
MC_MALLOC_REDZONE_SZB );
+ VG_(needs_xml_output) ();
=20
VG_(track_new_mem_startup) ( mc_new_mem_startup );
VG_(track_new_mem_stack_signal)( MC_(make_mem_undefined) );
Modified: trunk/none/tests/cmdline1.stdout.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/cmdline1.stdout.exp 2006-04-16 00:13:22 UTC (rev 585=
3)
+++ trunk/none/tests/cmdline1.stdout.exp 2006-04-16 10:25:43 UTC (rev 585=
4)
@@ -27,7 +27,7 @@
handle non-standard kernel variants
=20
user options for Valgrind tools that report errors:
- --xml=3Dyes all output is in XML (Memcheck/Nulgrind =
only)
+ --xml=3Dyes all output is in XML (some tools only)
--xml-user-comment=3DSTR copy STR verbatim to XML output
--demangle=3Dno|yes automatically demangle C++ names? [yes]
--num-callers=3D<number> show <number> callers in stack traces [1=
2]
Modified: trunk/none/tests/cmdline2.stdout.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/cmdline2.stdout.exp 2006-04-16 00:13:22 UTC (rev 585=
3)
+++ trunk/none/tests/cmdline2.stdout.exp 2006-04-16 10:25:43 UTC (rev 585=
4)
@@ -27,7 +27,7 @@
handle non-standard kernel variants
=20
user options for Valgrind tools that report errors:
- --xml=3Dyes all output is in XML (Memcheck/Nulgrind =
only)
+ --xml=3Dyes all output is in XML (some tools only)
--xml-user-comment=3DSTR copy STR verbatim to XML output
--demangle=3Dno|yes automatically demangle C++ names? [yes]
--num-callers=3D<number> show <number> callers in stack traces [1=
2]
|