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_check
;
34 bool fast_unwind_on_fatal
;
35 bool fast_unwind_on_malloc
;
37 int malloc_context_size
;
41 bool leak_check_at_exit
;
42 bool allocator_may_return_null
;
46 bool allow_user_segv_handler
;
48 bool detect_deadlocks
;
49 uptr clear_shadow_mmap_threshold
;
51 bool legacy_pthread_cond
;
52 bool intercept_tls_get_addr
;
57 const char *coverage_dir
;
58 bool full_address_space
;
59 const char *suppressions
;
60 bool print_suppressions
;
61 bool disable_coredump
;
62 bool symbolize_inline_frames
;
63 const char *stack_trace_format
;
66 inline CommonFlags
*common_flags() {
67 extern CommonFlags common_flags_dont_use
;
68 return &common_flags_dont_use
;
71 void SetCommonFlagsDefaults(CommonFlags
*f
);
72 void ParseCommonFlagsFromString(CommonFlags
*f
, const char *str
);
73 void PrintFlagDescriptions();
75 } // namespace __sanitizer
77 #endif // SANITIZER_FLAGS_H