Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Side by Side Diff: tools/valgrind/asan/third_party/asan_symbolize.py

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 #===- lib/asan/scripts/asan_symbolize.py -----------------------------------===# 2 #===- lib/asan/scripts/asan_symbolize.py -----------------------------------===#
3 # 3 #
4 # The LLVM Compiler Infrastructure 4 # The LLVM Compiler Infrastructure
5 # 5 #
6 # This file is distributed under the University of Illinois Open Source 6 # This file is distributed under the University of Illinois Open Source
7 # License. See LICENSE.TXT for details. 7 # License. See LICENSE.TXT for details.
8 # 8 #
9 #===------------------------------------------------------------------------===# 9 #===------------------------------------------------------------------------===#
10 import argparse 10 import argparse
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 # On Darwin, if the dsym hint producer is present: 359 # On Darwin, if the dsym hint producer is present:
360 # 1. check whether we've seen this binary already; if so, 360 # 1. check whether we've seen this binary already; if so,
361 # use |llvm_symbolizers[binary]|, which has already loaded the debug 361 # use |llvm_symbolizers[binary]|, which has already loaded the debug
362 # info for this binary (might not be the case for 362 # info for this binary (might not be the case for
363 # |last_llvm_symbolizer|); 363 # |last_llvm_symbolizer|);
364 # 2. otherwise check if we've seen all the hints for this binary already; 364 # 2. otherwise check if we've seen all the hints for this binary already;
365 # if so, reuse |last_llvm_symbolizer| which has the full set of hints; 365 # if so, reuse |last_llvm_symbolizer| which has the full set of hints;
366 # 3. otherwise create a new symbolizer and pass all currently known 366 # 3. otherwise create a new symbolizer and pass all currently known
367 # .dSYM hints to it. 367 # .dSYM hints to it.
368 if not binary in self.llvm_symbolizers: 368 if not binary in self.llvm_symbolizers:
369 use_last_symbolizer = True 369 use_new_symbolizer = True
370 if self.system == 'Darwin' and self.dsym_hint_producer: 370 if self.system == 'Darwin' and self.dsym_hint_producer:
371 dsym_hints_for_binary = set(self.dsym_hint_producer(binary)) 371 dsym_hints_for_binary = set(self.dsym_hint_producer(binary))
372 use_last_symbolizer = bool(dsym_hints_for_binary - self.dsym_hints) 372 use_new_symbolizer = bool(dsym_hints_for_binary - self.dsym_hints)
373 self.dsym_hints |= dsym_hints_for_binary 373 self.dsym_hints |= dsym_hints_for_binary
374 if self.last_llvm_symbolizer and use_last_symbolizer: 374 if self.last_llvm_symbolizer and not use_new_symbolizer:
375 self.llvm_symbolizers[binary] = self.last_llvm_symbolizer 375 self.llvm_symbolizers[binary] = self.last_llvm_symbolizer
376 else: 376 else:
377 self.last_llvm_symbolizer = LLVMSymbolizerFactory( 377 self.last_llvm_symbolizer = LLVMSymbolizerFactory(
378 self.system, guess_arch(addr), self.dsym_hints) 378 self.system, guess_arch(addr), self.dsym_hints)
379 self.llvm_symbolizers[binary] = self.last_llvm_symbolizer 379 self.llvm_symbolizers[binary] = self.last_llvm_symbolizer
380 # Use the chain of symbolizers: 380 # Use the chain of symbolizers:
381 # Breakpad symbolizer -> LLVM symbolizer -> addr2line/atos 381 # Breakpad symbolizer -> LLVM symbolizer -> addr2line/atos
382 # (fall back to next symbolizer if the previous one fails). 382 # (fall back to next symbolizer if the previous one fails).
383 if not binary in symbolizers: 383 if not binary in symbolizers:
384 symbolizers[binary] = ChainSymbolizer( 384 symbolizers[binary] = ChainSymbolizer(
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 binary_name_filter = sysroot_path_filter 460 binary_name_filter = sysroot_path_filter
461 sysroot_path = args.s 461 sysroot_path = args.s
462 if args.c: 462 if args.c:
463 binutils_prefix = args.c 463 binutils_prefix = args.c
464 if args.logfile: 464 if args.logfile:
465 logfile = args.logfile 465 logfile = args.logfile
466 else: 466 else:
467 logfile = sys.stdin 467 logfile = sys.stdin
468 loop = SymbolizationLoop(binary_name_filter) 468 loop = SymbolizationLoop(binary_name_filter)
469 loop.process_logfile() 469 loop.process_logfile()
OLDNEW
« no previous file with comments | « tools/valgrind/asan/third_party/README.chromium ('k') | tools/valgrind/gtest_exclude/components_unittests.gtest.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698