- add sources.
[platform/framework/web/crosswalk.git] / src / tools / valgrind / asan / asan_symbolize.py
1 #!/usr/bin/env python
2
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 from third_party import asan_symbolize
8
9 import re
10 import sys
11
12 def fix_filename(file_name):
13   for path_to_cut in sys.argv[1:]:
14     file_name = re.sub(".*" + path_to_cut, "", file_name)
15   file_name = re.sub(".*asan_[a-z_]*.cc:[0-9]*", "_asan_rtl_", file_name)
16   file_name = re.sub(".*crtstuff.c:0", "???:0", file_name)
17   return file_name
18
19 def main():
20   loop = asan_symbolize.SymbolizationLoop(binary_name_filter=fix_filename)
21   loop.process_stdin()
22
23 if __name__ == '__main__':
24   main()