2 /*--------------------------------------------------------------------*/
3 /*--- Basic definitions for all of Helgrind. ---*/
4 /*--- hg_basics.c ---*/
5 /*--------------------------------------------------------------------*/
8 This file is part of Helgrind, a Valgrind tool for detecting errors
11 Copyright (C) 2007-2017 OpenWorks Ltd
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, see <http://www.gnu.org/licenses/>.
27 The GNU General Public License is contained in the file COPYING.
30 #include "pub_tool_basics.h"
31 #include "pub_tool_libcbase.h"
32 #include "pub_tool_libcassert.h"
33 #include "pub_tool_mallocfree.h"
34 #include "pub_tool_threadstate.h"
36 #include "hg_basics.h" /* self */
39 /*----------------------------------------------------------------*/
40 /*--- Very basic stuff ---*/
41 /*----------------------------------------------------------------*/
43 void* HG_(zalloc
) ( const HChar
* cc
, SizeT n
)
47 p
= VG_(malloc
)( cc
, n
);
52 void HG_(free
) ( void* p
)
58 HChar
* HG_(strdup
) ( const HChar
* cc
, const HChar
* s
)
60 return VG_(strdup
)( cc
, s
);
64 /*----------------------------------------------------------------*/
65 /*--- Command line options ---*/
66 /*----------------------------------------------------------------*/
68 /* Description of these flags is in hg_basics.h. */
70 Bool
HG_(clo_track_lockorders
) = True
;
72 Bool
HG_(clo_cmp_race_err_addrs
) = False
;
74 UWord
HG_(clo_history_level
) = 2;
76 #if (defined(VGA_x86) || defined(VGA_amd64)) && defined(VGO_linux)
77 // Set to true on setup where it was (reasonably) validated.
78 Bool
HG_(clo_delta_stacktrace
) = True
;
80 Bool
HG_(clo_delta_stacktrace
) = False
;
83 UWord
HG_(clo_conflict_cache_size
) = 2000000;
85 UWord
HG_(clo_sanity_flags
) = 0;
87 Bool
HG_(clo_free_is_write
) = False
;
89 UWord
HG_(clo_vts_pruning
) = 1;
91 Bool
HG_(clo_check_stack_refs
) = True
;
93 /*--------------------------------------------------------------------*/
94 /*--- end hg_basics.c ---*/
95 /*--------------------------------------------------------------------*/