[compiler-rt] r231428 - Print out which symbolizer are we using when verbosity >= 2
Kuba Brecka
kuba.brecka at gmail.com
Thu Mar 5 15:38:23 PST 2015
Author: kuba.brecka
Date: Thu Mar 5 17:38:23 2015
New Revision: 231428
URL: http://llvm.org/viewvc/llvm-project?rev=231428&view=rev
Log:
Print out which symbolizer are we using when verbosity >= 2
Reviewed at http://reviews.llvm.org/D8087
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc?rev=231428&r1=231427&r2=231428&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc Thu Mar 5 17:38:23 2015
@@ -486,12 +486,15 @@ class POSIXSymbolizer : public Symbolize
static SymbolizerTool *ChooseSymbolizer(LowLevelAllocator *allocator) {
if (!common_flags()->symbolize) {
+ VReport(2, "Symbolizer is disabled.\n");
return nullptr;
}
if (SymbolizerTool *tool = InternalSymbolizer::get(allocator)) {
+ VReport(2, "Using internal symbolizer.\n");
return tool;
}
if (SymbolizerTool *tool = LibbacktraceSymbolizer::get(allocator)) {
+ VReport(2, "Using libbacktrace symbolizer.\n");
return tool;
}
const char *path_to_external = common_flags()->external_symbolizer_path;
@@ -504,14 +507,17 @@ static SymbolizerTool *ChooseSymbolizer(
path_to_external = FindPathToBinary("llvm-symbolizer");
}
if (path_to_external) {
+ VReport(2, "Using llvm-symbolizer at path: %s\n", path_to_external);
return new(*allocator) LLVMSymbolizer(path_to_external, allocator);
}
if (common_flags()->allow_addr2line) {
// If llvm-symbolizer is not found, try to use addr2line.
if (const char *addr2line_path = FindPathToBinary("addr2line")) {
+ VReport(2, "Using addr2line at path: %s\n", addr2line_path);
return new(*allocator) Addr2LinePool(addr2line_path, allocator);
}
}
+ VReport(2, "No internal or external symbolizer found.\n");
return nullptr;
}
More information about the llvm-commits
mailing list