drd/tests/std_thread2.supp: Add a suppression pattern
[valgrind.git] / helgrind / hg_errors.h
blob03a6086bd9d828d140c37e2ab945b25a6993e924
2 /*--------------------------------------------------------------------*/
3 /*--- Error management for Helgrind. ---*/
4 /*--- hg_errors.h ---*/
5 /*--------------------------------------------------------------------*/
7 /*
8 This file is part of Helgrind, a Valgrind tool for detecting errors
9 in threaded programs.
11 Copyright (C) 2007-2013 OpenWorks Ltd
12 info@open-works.co.uk
14 This program is free software; you can redistribute it and/or
15 modify it under the terms of the GNU General Public License as
16 published by the Free Software Foundation; either version 2 of the
17 License, or (at your option) any later version.
19 This program is distributed in the hope that it will be useful, but
20 WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 General Public License for more details.
24 You should have received a copy of the GNU General Public License
25 along with this program; if not, write to the Free Software
26 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
27 02111-1307, USA.
29 The GNU General Public License is contained in the file COPYING.
32 #ifndef __HG_ERRORS_H
33 #define __HG_ERRORS_H
36 /* The standard bundle of error management functions that we are
37 required to present to the core/tool interface at startup. */
38 Bool HG_(eq_Error) ( VgRes not_used, Error* e1, Error* e2 );
39 void HG_(before_pp_Error) ( Error* err );
40 void HG_(pp_Error) ( Error* err );
41 UInt HG_(update_extra) ( Error* err );
42 Bool HG_(recognised_suppression) ( const HChar* name, Supp *su );
43 Bool HG_(read_extra_suppression_info) ( Int fd, HChar** bufpp, SizeT* nBufp,
44 Int* lineno, Supp* su );
45 Bool HG_(error_matches_suppression) ( Error* err, Supp* su );
46 const HChar* HG_(get_error_name) ( Error* err );
47 Bool HG_(get_extra_suppression_info) ( Error* err,
48 /*OUT*/HChar* buf, Int nBuf );
49 Bool HG_(print_extra_suppression_use) ( Supp* su,
50 /*OUT*/HChar* buf, Int nBuf );
51 void HG_(update_extra_suppression_use) ( Error* err, Supp* su );
53 /* Functions for recording various kinds of errors. */
54 void HG_(record_error_Race) ( Thread* thr,
55 Addr data_addr, Int szB, Bool isWrite,
56 Thread* h1_confthr,
57 ExeContext* h1_ct_segstart,
58 ExeContext* h1_ct_mbsegend );
59 void HG_(record_error_UnlockUnlocked) ( Thread*, Lock* );
60 void HG_(record_error_UnlockForeign) ( Thread*, Thread*, Lock* );
61 void HG_(record_error_UnlockBogus) ( Thread*, Addr );
62 void HG_(record_error_PthAPIerror) ( Thread*, const HChar*, Word,
63 const HChar* );
65 /* see the implementation for meaning of these params */
66 void HG_(record_error_LockOrder) ( Thread*, Lock*, Lock*,
67 ExeContext*, ExeContext*,
68 ExeContext* );
70 void HG_(record_error_Misc_w_aux) ( Thread*, const HChar* errstr,
71 const HChar* auxstr,
72 ExeContext* auxctx );
73 void HG_(record_error_Misc) ( Thread* thr, const HChar* errstr );
76 /* Statistics pertaining to error management. */
77 extern ULong HG_(stats__LockN_to_P_queries);
78 extern ULong HG_(stats__LockN_to_P_get_map_size) ( void );
79 extern ULong HG_(stats__string_table_queries);
80 extern ULong HG_(stats__string_table_get_map_size) ( void );
82 #endif /* ! __HG_ERRORS_H */
84 /*--------------------------------------------------------------------*/
85 /*--- end hg_errors.h ---*/
86 /*--------------------------------------------------------------------*/