| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import argparse | 6 import argparse |
| 7 import codecs | 7 import codecs |
| 8 import logging | 8 import logging |
| 9 import os.path | 9 import os.path |
| 10 import platform |
| 10 import requests | 11 import requests |
| 11 import signal | 12 import signal |
| 12 import subprocess | 13 import subprocess |
| 13 import sys | 14 import sys |
| 14 import tempfile | 15 import tempfile |
| 15 | 16 |
| 16 | 17 |
| 17 from android_gdb.install_remote_file_reader import install | 18 from android_gdb.install_remote_file_reader import install |
| 18 from devtoolslib import paths | 19 from devtoolslib import paths |
| 19 | 20 |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 return | 188 return |
| 188 else: | 189 else: |
| 189 raise | 190 raise |
| 190 | 191 |
| 191 gdb_path = os.path.join( | 192 gdb_path = os.path.join( |
| 192 ndk_dir, | 193 ndk_dir, |
| 193 'toolchains', | 194 'toolchains', |
| 194 # TODO(etiennej): Always select the most recent toolchain? | 195 # TODO(etiennej): Always select the most recent toolchain? |
| 195 'arm-linux-androideabi-4.9', | 196 'arm-linux-androideabi-4.9', |
| 196 'prebuilt', | 197 'prebuilt', |
| 197 # TODO(etiennej): DEPS mac NDK and use it on macs. | 198 '%s-%s' % (platform.system().lower(), platform.machine()), |
| 198 'linux-x86_64', | |
| 199 'bin', | 199 'bin', |
| 200 'arm-linux-androideabi-gdb') | 200 'arm-linux-androideabi-gdb') |
| 201 python_gdb_script_path = os.path.join(os.path.dirname(__file__), | 201 python_gdb_script_path = os.path.join(os.path.dirname(__file__), |
| 202 'android_gdb', 'session.py') | 202 'android_gdb', 'session.py') |
| 203 debug_session_arguments = {} | 203 debug_session_arguments = {} |
| 204 if args.build_dir: | 204 if args.build_dir: |
| 205 debug_session_arguments["build_directory_list"] = ','.join(args.build_dir) | 205 debug_session_arguments["build_directory_list"] = ','.join(args.build_dir) |
| 206 else: | 206 else: |
| 207 try: | 207 try: |
| 208 debug_session_arguments["build_directory_list"] = os.path.join( | 208 debug_session_arguments["build_directory_list"] = os.path.join( |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 subparsers = parser.add_subparsers(help='the tool to run') | 304 subparsers = parser.add_subparsers(help='the tool to run') |
| 305 _add_device_command(subparsers) | 305 _add_device_command(subparsers) |
| 306 _add_tracing_command(subparsers) | 306 _add_tracing_command(subparsers) |
| 307 _add_gdb_command(subparsers) | 307 _add_gdb_command(subparsers) |
| 308 | 308 |
| 309 args = parser.parse_args() | 309 args = parser.parse_args() |
| 310 return args.func(args) | 310 return args.func(args) |
| 311 | 311 |
| 312 if __name__ == '__main__': | 312 if __name__ == '__main__': |
| 313 sys.exit(main()) | 313 sys.exit(main()) |
| OLD | NEW |