OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 import json | 4 import json |
5 import logging | 5 import logging |
6 import os | 6 import os |
7 import subprocess | 7 import subprocess |
8 import tempfile | 8 import tempfile |
9 | 9 |
10 from telemetry import adb_commands | 10 from telemetry import adb_commands |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 symbolized_stack = subprocess.Popen([ | 152 symbolized_stack = subprocess.Popen([ |
153 'ndk-stack', '-sym', symbol_path, | 153 'ndk-stack', '-sym', symbol_path, |
154 '-dump', f.name], stdout=subprocess.PIPE).communicate()[0] | 154 '-dump', f.name], stdout=subprocess.PIPE).communicate()[0] |
155 except Exception: | 155 except Exception: |
156 pass | 156 pass |
157 if symbolized_stack: | 157 if symbolized_stack: |
158 return symbolized_stack | 158 return symbolized_stack |
159 # Otherwise, just return the last 100 lines of logcat. | 159 # Otherwise, just return the last 100 lines of logcat. |
160 return '\n'.join(self._adb.RunShellCommand('logcat -d -t 100')) | 160 return '\n'.join(self._adb.RunShellCommand('logcat -d -t 100')) |
161 | 161 |
162 def CreateForwarder(self, *ports): | 162 def CreateForwarder(self, *port_pairs): |
163 return adb_commands.Forwarder(self._adb, *ports) | 163 return adb_commands.Forwarder(self._adb, *port_pairs) |
OLD | NEW |