Index: infra/bots/recipe_modules/flavor/gn_android_flavor.py |
diff --git a/infra/bots/recipe_modules/flavor/gn_android_flavor.py b/infra/bots/recipe_modules/flavor/gn_android_flavor.py |
index b37c20641e375bf86ea24429291273b560c81192..a375f3cc4151e9b2fa04946f8a0bdb63d5e4cabf 100644 |
--- a/infra/bots/recipe_modules/flavor/gn_android_flavor.py |
+++ b/infra/bots/recipe_modules/flavor/gn_android_flavor.py |
@@ -79,7 +79,24 @@ class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils): |
def cleanup_steps(self): |
if self._ever_ran_adb: |
- self._adb('dump log', 'logcat', '-d') |
+ self.m.python.inline('dump log', """ |
+ import os |
+ import subprocess |
+ import sys |
+ out = sys.argv[1] |
+ log = subprocess.check_output(['adb', 'logcat', '-d']) |
+ for line in log.split('\\n'): |
+ tokens = line.split() |
+ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc': |
+ addr, path = tokens[-2:] |
+ local = os.path.join(out, os.path.basename(path)) |
+ if os.path.exists(local): |
+ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr]) |
+ line = line.replace(addr, addr + ' ' + sym.strip()) |
+ print line |
+ """, |
+ args=[self.m.vars.skia_out.join(self.m.vars.configuration)], |
+ infra_step=True) |
self._adb('reboot', 'reboot') |
self._adb('kill adb server', 'kill-server') |