|
From: <sv...@va...> - 2007-09-12 08:53:37
|
Author: sewardj
Date: 2007-09-12 09:53:35 +0100 (Wed, 12 Sep 2007)
New Revision: 6823
Log:
Core-tool interface: give 'needs_tool_errors' an extra Boolean indicating
whether or not the core should print thread id's on error messages.
Modified:
branches/THRCHECK/coregrind/m_errormgr.c
branches/THRCHECK/coregrind/m_tooliface.c
branches/THRCHECK/coregrind/pub_core_tooliface.h
branches/THRCHECK/helgrind/hg_main.c
branches/THRCHECK/include/pub_tool_tooliface.h
branches/THRCHECK/memcheck/mc_main.c
branches/THRCHECK/thrcheck/tc_main.c
Modified: branches/THRCHECK/coregrind/m_errormgr.c
===================================================================
--- branches/THRCHECK/coregrind/m_errormgr.c 2007-09-12 00:22:57 UTC (rev 6822)
+++ branches/THRCHECK/coregrind/m_errormgr.c 2007-09-12 08:53:35 UTC (rev 6823)
@@ -293,7 +293,8 @@
}
if (!VG_(clo_xml)) {
- if (err->tid > 0 && err->tid != last_tid_printed) {
+ if (VG_(tdict).tool_show_ThreadIDs_for_errors
+ && err->tid > 0 && err->tid != last_tid_printed) {
VG_(message)(Vg_UserMsg, "Thread %d:", err->tid );
last_tid_printed = err->tid;
}
Modified: branches/THRCHECK/coregrind/m_tooliface.c
===================================================================
--- branches/THRCHECK/coregrind/m_tooliface.c 2007-09-12 00:22:57 UTC (rev 6822)
+++ branches/THRCHECK/coregrind/m_tooliface.c 2007-09-12 08:53:35 UTC (rev 6823)
@@ -176,6 +176,7 @@
void VG_(needs_tool_errors)(
Bool (*eq) (VgRes, Error*, Error*),
void (*pp) (Error*),
+ Bool show_TIDs,
UInt (*update) (Error*),
Bool (*recog) (Char*, Supp*),
Bool (*read_extra) (Int, Char*, Int, Supp*),
@@ -187,6 +188,7 @@
VG_(needs).tool_errors = True;
VG_(tdict).tool_eq_Error = eq;
VG_(tdict).tool_pp_Error = pp;
+ VG_(tdict).tool_show_ThreadIDs_for_errors = show_TIDs;
VG_(tdict).tool_update_extra = update;
VG_(tdict).tool_recognised_suppression = recog;
VG_(tdict).tool_read_extra_suppression_info = read_extra;
Modified: branches/THRCHECK/coregrind/pub_core_tooliface.h
===================================================================
--- branches/THRCHECK/coregrind/pub_core_tooliface.h 2007-09-12 00:22:57 UTC (rev 6822)
+++ branches/THRCHECK/coregrind/pub_core_tooliface.h 2007-09-12 08:53:35 UTC (rev 6823)
@@ -118,6 +118,7 @@
// VG_(needs).tool_errors
Bool (*tool_eq_Error) (VgRes, Error*, Error*);
void (*tool_pp_Error) (Error*);
+ Bool tool_show_ThreadIDs_for_errors;
UInt (*tool_update_extra) (Error*);
Bool (*tool_recognised_suppression) (Char*, Supp*);
Bool (*tool_read_extra_suppression_info) (Int, Char*, Int, Supp*);
Modified: branches/THRCHECK/helgrind/hg_main.c
===================================================================
--- branches/THRCHECK/helgrind/hg_main.c 2007-09-12 00:22:57 UTC (rev 6822)
+++ branches/THRCHECK/helgrind/hg_main.c 2007-09-12 08:53:35 UTC (rev 6823)
@@ -3413,6 +3413,7 @@
VG_(needs_core_errors) ();
VG_(needs_tool_errors) (hg_eq_Error,
hg_pp_Error,
+ True,/*show TIDs for errors*/
hg_update_extra,
hg_recognised_suppression,
hg_read_extra_suppression_info,
Modified: branches/THRCHECK/include/pub_tool_tooliface.h
===================================================================
--- branches/THRCHECK/include/pub_tool_tooliface.h 2007-09-12 00:22:57 UTC (rev 6822)
+++ branches/THRCHECK/include/pub_tool_tooliface.h 2007-09-12 08:53:35 UTC (rev 6823)
@@ -303,6 +303,9 @@
// Print error context.
void (*pp_Error)(Error* err),
+ // Should the core indicate which ThreadId each error comes from?
+ Bool show_ThreadIDs_for_errors,
+
// Should fill in any details that could be postponed until after the
// decision whether to ignore the error (ie. details not affecting the
// result of VG_(tdict).tool_eq_Error()). This saves time when errors
Modified: branches/THRCHECK/memcheck/mc_main.c
===================================================================
--- branches/THRCHECK/memcheck/mc_main.c 2007-09-12 00:22:57 UTC (rev 6822)
+++ branches/THRCHECK/memcheck/mc_main.c 2007-09-12 08:53:35 UTC (rev 6823)
@@ -4975,6 +4975,7 @@
VG_(needs_core_errors) ();
VG_(needs_tool_errors) (mc_eq_Error,
mc_pp_Error,
+ True,/*show TIDs for errors*/
mc_update_extra,
mc_recognised_suppression,
mc_read_extra_suppression_info,
Modified: branches/THRCHECK/thrcheck/tc_main.c
===================================================================
--- branches/THRCHECK/thrcheck/tc_main.c 2007-09-12 00:22:57 UTC (rev 6822)
+++ branches/THRCHECK/thrcheck/tc_main.c 2007-09-12 08:53:35 UTC (rev 6823)
@@ -4617,6 +4617,7 @@
VG_(needs_core_errors) ();
VG_(needs_tool_errors) (tc_eq_Error,
tc_pp_Error,
+ False,/*show TIDs for errors*/
tc_update_extra,
tc_recognised_suppression,
tc_read_extra_suppression_info,
|