Commit 7dc2d89a authored by earthdok's avatar earthdok Committed by Commit bot

Fix path prefix stripping in asan_symbolize.py.

BUG=none
R=glider@chromium.org
NOTRY=true

Review URL: https://codereview.chromium.org/586533004

Cr-Commit-Position: refs/heads/master@{#295694}
parent 38abcc93
......@@ -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__':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment