[PATCH] [compiler-rt] Print out which symbolizer are we using when verbosity >= 2
Kuba Brecka
kuba.brecka at gmail.com
Thu Mar 5 12:15:38 PST 2015
Just adding a few VReport()'s to print the name and path (for external symbolizers) of the symbolizer in use.
http://reviews.llvm.org/D8087
Files:
lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
Index: lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
===================================================================
--- lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
+++ lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
@@ -486,12 +486,15 @@
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 @@
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;
}
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8087.21298.patch
Type: text/x-patch
Size: 1511 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150305/b6906376/attachment.bin>
More information about the llvm-commits
mailing list