aboutsummaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_flags.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sanitizer_common/sanitizer_flags.h')
-rw-r--r--lib/sanitizer_common/sanitizer_flags.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_flags.h b/lib/sanitizer_common/sanitizer_flags.h
index b7ce4524b055..e97ce6a87188 100644
--- a/lib/sanitizer_common/sanitizer_flags.h
+++ b/lib/sanitizer_common/sanitizer_flags.h
@@ -22,6 +22,29 @@ void ParseFlag(const char *env, bool *flag, const char *name);
void ParseFlag(const char *env, int *flag, const char *name);
void ParseFlag(const char *env, const char **flag, const char *name);
+struct CommonFlags {
+ // If set, use the online symbolizer from common sanitizer runtime.
+ bool symbolize;
+ // Path to external symbolizer.
+ const char *external_symbolizer_path;
+ // Strips this prefix from file paths in error reports.
+ const char *strip_path_prefix;
+ // Use fast (frame-pointer-based) unwinder on fatal errors (if available).
+ bool fast_unwind_on_fatal;
+ // Use fast (frame-pointer-based) unwinder on malloc/free (if available).
+ bool fast_unwind_on_malloc;
+ // Max number of stack frames kept for each allocation/deallocation.
+ int malloc_context_size;
+};
+
+extern CommonFlags common_flags_dont_use_directly;
+
+inline CommonFlags *common_flags() {
+ return &common_flags_dont_use_directly;
+}
+
+void ParseCommonFlagsFromString(const char *str);
+
} // namespace __sanitizer
#endif // SANITIZER_FLAGS_H