|
From: <sv...@va...> - 2009-05-16 02:03:37
|
Author: sewardj
Date: 2009-05-16 02:50:48 +0100 (Sat, 16 May 2009)
New Revision: 9846
Log:
Change VG_(needs_xml_output), so as to give it a new method,
before_pp_Error. This gives tools the chance to inspect an error
which the core is just about to print using pp_Error, so it can
generate whatever preamble it likes. This is important for generating
thread announcements in Helgrind.
Hmm. Actually this doesn't have that much to do with XML any more;
Helgrind now uses it to generate thread announcements even in text
mode. Perhaps this method should be moved to the
VG_(needs_core_errors) group.
This change no doubt breaks the build (on this branch).
Modified:
branches/MESSAGING_TIDYUP/coregrind/m_tooliface.c
branches/MESSAGING_TIDYUP/coregrind/pub_core_tooliface.h
Modified: branches/MESSAGING_TIDYUP/coregrind/m_tooliface.c
===================================================================
--- branches/MESSAGING_TIDYUP/coregrind/m_tooliface.c 2009-05-16 01:42:30 UTC (rev 9845)
+++ branches/MESSAGING_TIDYUP/coregrind/m_tooliface.c 2009-05-16 01:50:48 UTC (rev 9846)
@@ -214,7 +214,6 @@
NEEDS(libc_freeres)
NEEDS(core_errors)
NEEDS(var_info)
-NEEDS(xml_output)
void VG_(needs_superblock_discards)(
void (*discard)(Addr64, VexGuestExtents)
@@ -316,6 +315,14 @@
VG_(tdict).tool_client_redzone_szB = client_malloc_redzone_szB;
}
+void VG_(needs_xml_output)(
+ void (*before_pp_Error)( Error* )
+)
+{
+ VG_(needs).xml_output = True;
+ VG_(tdict).tool_before_pp_Error = before_pp_Error;
+}
+
void VG_(needs_final_IR_tidy_pass)(
IRSB*(*final_tidy)(IRSB*)
)
Modified: branches/MESSAGING_TIDYUP/coregrind/pub_core_tooliface.h
===================================================================
--- branches/MESSAGING_TIDYUP/coregrind/pub_core_tooliface.h 2009-05-16 01:42:30 UTC (rev 9845)
+++ branches/MESSAGING_TIDYUP/coregrind/pub_core_tooliface.h 2009-05-16 01:50:48 UTC (rev 9846)
@@ -161,6 +161,9 @@
// VG_(needs).final_IR_tidy_pass
IRSB* (*tool_final_IR_tidy_pass) (IRSB*);
+ // VG_(needs).xml_output
+ void (*tool_before_pp_Error) (Error*);
+
// -- Event tracking functions ------------------------------------
void (*track_new_mem_startup) (Addr, SizeT, Bool, Bool, Bool, ULong);
void (*track_new_mem_stack_signal)(Addr, SizeT, ThreadId);
|