summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/sanitizer_flags.cc
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2014-02-12 08:29:42 +0000
committerAlexey Samsonov <samsonov@google.com>2014-02-12 08:29:42 +0000
commit7304b4201f7f5b64cb44c540d98182cea1f630da (patch)
treeaebab3e230b7ceb6e7bc88db4a435ef782e8dca3 /compiler-rt/lib/sanitizer_common/sanitizer_flags.cc
parentc34a997669646c0f87f6eb63a57173f4e2e2ac71 (diff)
downloadbcm5719-llvm-7304b4201f7f5b64cb44c540d98182cea1f630da.tar.gz
bcm5719-llvm-7304b4201f7f5b64cb44c540d98182cea1f630da.zip
[Sanitizer] Teach external symbolizer to work with addr2line if llvm-symbolizer is unavailable. Allow this mode in TSan.
llvm-svn: 201218
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_flags.cc')
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_flags.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_flags.cc b/compiler-rt/lib/sanitizer_common/sanitizer_flags.cc
index cbff0a541a1..2982a0bb472 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_flags.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_flags.cc
@@ -23,6 +23,7 @@ CommonFlags common_flags_dont_use;
void SetCommonFlagsDefaults(CommonFlags *f) {
f->symbolize = true;
f->external_symbolizer_path = 0;
+ f->allow_addr2line = false;
f->strip_path_prefix = "";
f->fast_unwind_on_fatal = false;
f->fast_unwind_on_malloc = true;
@@ -44,6 +45,7 @@ void SetCommonFlagsDefaults(CommonFlags *f) {
void ParseCommonFlagsFromString(CommonFlags *f, const char *str) {
ParseFlag(str, &f->symbolize, "symbolize");
ParseFlag(str, &f->external_symbolizer_path, "external_symbolizer_path");
+ ParseFlag(str, &f->allow_addr2line, "allow_addr2line");
ParseFlag(str, &f->strip_path_prefix, "strip_path_prefix");
ParseFlag(str, &f->fast_unwind_on_fatal, "fast_unwind_on_fatal");
ParseFlag(str, &f->fast_unwind_on_malloc, "fast_unwind_on_malloc");
@@ -63,8 +65,6 @@ void ParseCommonFlagsFromString(CommonFlags *f, const char *str) {
// Do a sanity check for certain flags.
if (f->malloc_context_size < 1)
f->malloc_context_size = 1;
- if (!f->symbolize)
- f->external_symbolizer_path = "";
}
static bool GetFlagValue(const char *env, const char *name,
OpenPOWER on IntegriCloud