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

Unified Diff: tools/valgrind/asan/asan_symbolize.py

Issue 586533004: Fix path prefix stripping in asan_symbolize.py. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/valgrind/asan/asan_symbolize.py
diff --git a/tools/valgrind/asan/asan_symbolize.py b/tools/valgrind/asan/asan_symbolize.py
index 419ac877071ad180c1812969f5eb411070d01247..b7a73355e9ebfdd169b3e9978d3e58b247ace899 100755
--- a/tools/valgrind/asan/asan_symbolize.py
+++ b/tools/valgrind/asan/asan_symbolize.py
@@ -7,16 +7,8 @@
from third_party import asan_symbolize
import os
-import re
import sys
-def fix_filename(file_name):
- for path_to_cut in sys.argv[1:]:
- file_name = re.sub(".*" + path_to_cut, "", file_name)
- file_name = re.sub(".*asan_[a-z_]*.cc:[0-9]*", "_asan_rtl_", file_name)
- file_name = re.sub(".*crtstuff.c:0", "???:0", file_name)
- return file_name
-
class LineBuffered(object):
"""Disable buffering on a file object."""
def __init__(self, stream):
@@ -43,7 +35,9 @@ def disable_buffering():
def main():
disable_buffering()
asan_symbolize.demangle = True
- loop = asan_symbolize.SymbolizationLoop(binary_name_filter=fix_filename)
+ asan_symbolize.fix_filename_patterns = sys.argv[1:]
+ asan_symbolize.logfile = sys.stdin
+ loop = asan_symbolize.SymbolizationLoop()
loop.process_logfile()
if __name__ == '__main__':
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698