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

Unified Diff: build/android/asan_symbolize.py

Issue 148763008: Update asan_symbolize script to work with new logcat format. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 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: build/android/asan_symbolize.py
diff --git a/build/android/asan_symbolize.py b/build/android/asan_symbolize.py
index 928798f5e524cc9621be3ac8868e4593f608674a..0504aa23aec0d86b793edeeca09c5d48a0a61fbe 100755
--- a/build/android/asan_symbolize.py
+++ b/build/android/asan_symbolize.py
@@ -20,16 +20,17 @@ sys.path.insert(0,
import symbol
-_RE_ASAN = re.compile(r'I/asanwrapper\.sh.*?(#\S*?) (\S*?) \((.*?)\+(.*?)\)')
+_RE_ASAN = re.compile(r'(.*?)(#\S*?) (\S*?) \((.*?)\+(.*?)\)')
def _ParseAsanLogLine(line):
m = re.match(_RE_ASAN, line)
if not m:
return None
return {
- 'library': m.group(3),
- 'pos': m.group(1),
- 'rel_address': '%08x' % int(m.group(4), 16),
+ 'prefix': m.group(1),
+ 'library': m.group(4),
+ 'pos': m.group(2),
+ 'rel_address': '%08x' % int(m.group(5), 16),
}
@@ -56,7 +57,7 @@ def _Symbolize(input):
asan_libs = _FindASanLibraries()
libraries = collections.defaultdict(list)
asan_lines = []
- for asan_log_line in [a.strip() for a in input]:
+ for asan_log_line in [a.rstrip() for a in input]:
m = _ParseAsanLogLine(asan_log_line)
if m:
libraries[m['library']].append(m)
@@ -81,7 +82,7 @@ def _Symbolize(input):
if (m['library'] in all_symbols and
m['rel_address'] in all_symbols[m['library']]['symbols']):
s = all_symbols[m['library']]['symbols'][m['rel_address']][0]
- print s[0], s[1], s[2]
+ print '%s%s %s %s' %(m['prefix'], m['pos'], s[0], s[1])
else:
print asan_log_line['raw_log']
« 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