1 //===-- sanitizer_flags.h ---------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file is a part of ThreadSanitizer/AddressSanitizer runtime.
12 //===----------------------------------------------------------------------===//
14 #ifndef SANITIZER_FLAGS_H
15 #define SANITIZER_FLAGS_H
17 #include "sanitizer_internal_defs.h"
19 namespace __sanitizer {
21 void ParseFlag(const char *env, bool *flag,
22 const char *name, const char *descr);
23 void ParseFlag(const char *env, int *flag,
24 const char *name, const char *descr);
25 void ParseFlag(const char *env, uptr *flag,
26 const char *name, const char *descr);
27 void ParseFlag(const char *env, const char **flag,
28 const char *name, const char *descr);
32 const char *external_symbolizer_path;
34 const char *strip_path_prefix;
35 bool fast_unwind_on_check;
36 bool fast_unwind_on_fatal;
37 bool fast_unwind_on_malloc;
39 int malloc_context_size;
43 bool leak_check_at_exit;
44 bool allocator_may_return_null;
48 bool allow_user_segv_handler;
50 bool detect_deadlocks;
51 uptr clear_shadow_mmap_threshold;
53 bool legacy_pthread_cond;
54 bool intercept_tls_get_addr;
59 const char *coverage_dir;
60 bool full_address_space;
61 const char *suppressions;
62 bool print_suppressions;
63 bool disable_coredump;
64 bool symbolize_inline_frames;
65 const char *stack_trace_format;
68 inline CommonFlags *common_flags() {
69 extern CommonFlags common_flags_dont_use;
70 return &common_flags_dont_use;
73 void SetCommonFlagsDefaults(CommonFlags *f);
74 void ParseCommonFlagsFromString(CommonFlags *f, const char *str);
75 void PrintFlagDescriptions();
77 } // namespace __sanitizer
79 #endif // SANITIZER_FLAGS_H