[asan] Allow users of asan_symbolize.py to forbid fallback to atos/addr2line.

llvm-svn: 231492
This commit is contained in:
Sergey Matveev 2015-03-06 17:05:28 +00:00
parent 6b42f2d8aa
commit 4a792988b3
1 changed files with 3 additions and 0 deletions

View File

@ -23,6 +23,7 @@ sysroot_path = None
binary_name_filter = None binary_name_filter = None
fix_filename_patterns = None fix_filename_patterns = None
logfile = sys.stdin logfile = sys.stdin
allow_system_symbolizer = True
# FIXME: merge the code that calls fix_filename(). # FIXME: merge the code that calls fix_filename().
def fix_filename(file_name): def fix_filename(file_name):
@ -392,6 +393,8 @@ class SymbolizationLoop(object):
[BreakpadSymbolizerFactory(binary), self.llvm_symbolizers[binary]]) [BreakpadSymbolizerFactory(binary), self.llvm_symbolizers[binary]])
result = symbolizers[binary].symbolize(addr, binary, offset) result = symbolizers[binary].symbolize(addr, binary, offset)
if result is None: if result is None:
if not allow_system_symbolizer:
raise Exception('Failed to launch or use llvm-symbolizer.')
# Initialize system symbolizer only if other symbolizers failed. # Initialize system symbolizer only if other symbolizers failed.
symbolizers[binary].append_symbolizer( symbolizers[binary].append_symbolizer(
SystemSymbolizerFactory(self.system, addr, binary)) SystemSymbolizerFactory(self.system, addr, binary))