{
if (VG_(clo_xml)) {
VG_(message)(Vg_UserMsg, "<error>");
+ VG_(message)(Vg_UserMsg, " <unique>0x%llx</unique>",
+ Ptr_to_ULong(err));
VG_(message)(Vg_UserMsg, " <tid>%d</tid>", err->tid);
}
}
-/* This is called not from generated code but from the scheduler */
+/* Show all the errors that occurred, and possibly also the
+ suppressions used. */
void VG_(show_all_errors) ( void )
{
Int i, n_min;
}
}
+
+/* Show occurrence counts of all errors, in XML form. */
+void VG_(show_error_counts_as_XML) ( void )
+{
+ Error* err;
+ VG_(message)(Vg_UserMsg, "<errorcounts>");
+ for (err = errors; err != NULL; err = err->next) {
+ if (err->supp != NULL)
+ continue;
+ if (err->count <= 0)
+ continue;
+ VG_(message)(
+ Vg_UserMsg, " <pair><unique>0x%llx</unique>"
+ "<count>%d</count></pair>",
+ Ptr_to_ULong(err), err->count
+ );
+ }
+ VG_(message)(Vg_UserMsg, "</errorcounts>");
+}
+
+
/*------------------------------------------------------------*/
/*--- Standard suppressions ---*/
/*------------------------------------------------------------*/
}
CoreErrorKind;
-extern void VG_(load_suppressions) ( void );
+extern void VG_(load_suppressions) ( void );
-extern void VG_(show_all_errors) ( void );
+extern void VG_(show_all_errors) ( void );
-extern Bool VG_(is_action_requested) ( Char* action, Bool* clo );
+extern void VG_(show_error_counts_as_XML) ( void );
-extern UInt VG_(get_n_errs_found) ( void );
+extern Bool VG_(is_action_requested) ( Char* action, Bool* clo );
+
+extern UInt VG_(get_n_errs_found) ( void );
#endif // __PUB_CORE_ERRORMGR_H
VG_(message)(Vg_UserMsg, "");
if (VG_(clo_xml)) {
+ if (VG_(needs).core_errors || VG_(needs).tool_errors) {
+ VG_(show_error_counts_as_XML)();
+ VG_(message)(Vg_UserMsg, "");
+ }
VG_(message)(Vg_UserMsg, "<status>FINISHED</status>");
VG_(message)(Vg_UserMsg, "");
}