1 //===-- sanitizer_flags.h ---------------------------------------*- C++ -*-===//
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
6 //===----------------------------------------------------------------------===//
8 // This file is a part of ThreadSanitizer/AddressSanitizer runtime.
10 //===----------------------------------------------------------------------===//
12 #ifndef SANITIZER_FLAGS_H
13 #define SANITIZER_FLAGS_H
15 #include "sanitizer_internal_defs.h"
17 namespace __sanitizer
{
19 void ParseFlag(const char *env
, bool *flag
,
20 const char *name
, const char *descr
);
21 void ParseFlag(const char *env
, int *flag
,
22 const char *name
, const char *descr
);
23 void ParseFlag(const char *env
, uptr
*flag
,
24 const char *name
, const char *descr
);
25 void ParseFlag(const char *env
, const char **flag
,
26 const char *name
, const char *descr
);
30 const char *external_symbolizer_path
;
32 const char *strip_path_prefix
;
33 bool fast_unwind_on_fatal
;
34 bool fast_unwind_on_malloc
;
36 int malloc_context_size
;
40 bool leak_check_at_exit
;
41 bool allocator_may_return_null
;
45 bool allow_user_segv_handler
;
47 bool detect_deadlocks
;
48 uptr clear_shadow_mmap_threshold
;
50 bool legacy_pthread_cond
;
51 bool intercept_tls_get_addr
;
56 const char *coverage_dir
;
57 bool full_address_space
;
58 const char *suppressions
;
59 bool print_suppressions
;
60 bool disable_coredump
;
63 inline CommonFlags
*common_flags() {
64 extern CommonFlags common_flags_dont_use
;
65 return &common_flags_dont_use
;
68 void SetCommonFlagsDefaults(CommonFlags
*f
);
69 void ParseCommonFlagsFromString(CommonFlags
*f
, const char *str
);
70 void PrintFlagDescriptions();
72 } // namespace __sanitizer
74 #endif // SANITIZER_FLAGS_H