* sanitizer_common/Makefile.am (AM_CXXFLAGS): Use -std=gnu++11.
[official-gcc.git] / libsanitizer / sanitizer_common / sanitizer_flags.h
blobb7a501318117753c49f8af3403533d2ce05561aa
1 //===-- sanitizer_flags.h ---------------------------------------*- C++ -*-===//
2 //
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
5 //
6 //===----------------------------------------------------------------------===//
7 //
8 // This file is a part of ThreadSanitizer/AddressSanitizer runtime.
9 //
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);
28 struct CommonFlags {
29 bool symbolize;
30 const char *external_symbolizer_path;
31 bool allow_addr2line;
32 const char *strip_path_prefix;
33 bool fast_unwind_on_check;
34 bool fast_unwind_on_fatal;
35 bool fast_unwind_on_malloc;
36 bool handle_ioctl;
37 int malloc_context_size;
38 const char *log_path;
39 int verbosity;
40 bool detect_leaks;
41 bool leak_check_at_exit;
42 bool allocator_may_return_null;
43 bool print_summary;
44 bool check_printf;
45 bool handle_segv;
46 bool allow_user_segv_handler;
47 bool use_sigaltstack;
48 bool detect_deadlocks;
49 uptr clear_shadow_mmap_threshold;
50 const char *color;
51 bool legacy_pthread_cond;
52 bool intercept_tls_get_addr;
53 bool help;
54 uptr mmap_limit_mb;
55 bool coverage;
56 bool coverage_direct;
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