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

Side by Side Diff: build/android/asan_symbolize.py

Issue 1698283002: Fix logcat regex in asan stack trace symbolizer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Greed is good Created 4 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2013 The Chromium Authors. All rights reserved. 3 # Copyright 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 7
8 import collections 8 import collections
9 import optparse 9 import optparse
10 import os 10 import os
11 import re 11 import re
12 import sys 12 import sys
13 13
14 from pylib import constants 14 from pylib import constants
15 from pylib.constants import host_paths 15 from pylib.constants import host_paths
16 16
17 # Uses symbol.py from third_party/android_platform, not python's. 17 # Uses symbol.py from third_party/android_platform, not python's.
18 with host_paths.SysPath( 18 with host_paths.SysPath(
19 host_paths.ANDROID_PLATFORM_DEVELOPMENT_SCRIPTS_PATH, 19 host_paths.ANDROID_PLATFORM_DEVELOPMENT_SCRIPTS_PATH,
20 position=0): 20 position=0):
21 import symbol 21 import symbol
22 22
23 23
24 _RE_ASAN = re.compile(r'(.*?)(#\S*?) (\S*?) \((.*?)\+(.*?)\)') 24 _RE_ASAN = re.compile(r'(.*?)(#\S*?)\s+(\S*?)\s+\((.*?)\+(.*?)\)')
25 25
26 def _ParseAsanLogLine(line): 26 def _ParseAsanLogLine(line):
27 m = re.match(_RE_ASAN, line) 27 m = re.match(_RE_ASAN, line)
28 if not m: 28 if not m:
29 return None 29 return None
30 return { 30 return {
31 'prefix': m.group(1), 31 'prefix': m.group(1),
32 'library': m.group(4), 32 'library': m.group(4),
33 'pos': m.group(2), 33 'pos': m.group(2),
34 'rel_address': '%08x' % int(m.group(5), 16), 34 'rel_address': '%08x' % int(m.group(5), 16),
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 if options.logcat: 106 if options.logcat:
107 asan_input = file(options.logcat, 'r') 107 asan_input = file(options.logcat, 'r')
108 else: 108 else:
109 asan_input = sys.stdin 109 asan_input = sys.stdin
110 _Symbolize(asan_input.readlines()) 110 _Symbolize(asan_input.readlines())
111 111
112 112
113 if __name__ == "__main__": 113 if __name__ == "__main__":
114 sys.exit(main()) 114 sys.exit(main())
OLDNEW
« 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