| 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 requests | 10 import requests |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 device_parser.add_argument('--adb-path', type=str, | 280 device_parser.add_argument('--adb-path', type=str, |
| 281 help='path to the adb tool from the Android SDK (optional)') | 281 help='path to the adb tool from the Android SDK (optional)') |
| 282 device_subparser = device_parser.add_subparsers( | 282 device_subparser = device_parser.add_subparsers( |
| 283 help='the command to run') | 283 help='the command to run') |
| 284 | 284 |
| 285 device_stack_parser = device_subparser.add_parser('stack', | 285 device_stack_parser = device_subparser.add_parser('stack', |
| 286 help='symbolize the crash stacktraces from the device log') | 286 help='symbolize the crash stacktraces from the device log') |
| 287 device_stack_parser.add_argument('--ndk-dir', type=str, | 287 device_stack_parser.add_argument('--ndk-dir', type=str, |
| 288 help='path to the directory containing the Android NDK') | 288 help='path to the directory containing the Android NDK') |
| 289 device_stack_parser.add_argument('--build-dir', type=str, | 289 device_stack_parser.add_argument('--build-dir', type=str, |
| 290 help='path to the build directory') | 290 help='list paths to the build directories, separated by commas') |
| 291 device_stack_parser.set_defaults(func=_device_stack) | 291 device_stack_parser.set_defaults(func=_device_stack) |
| 292 | 292 |
| 293 | 293 |
| 294 def _add_gdb_command(subparsers): | 294 def _add_gdb_command(subparsers): |
| 295 gdb_parser = subparsers.add_parser( | 295 gdb_parser = subparsers.add_parser( |
| 296 'gdb', help='Debug Mojo Shell and its apps using GDB') | 296 'gdb', help='Debug Mojo Shell and its apps using GDB') |
| 297 gdb_subparser = gdb_parser.add_subparsers( | 297 gdb_subparser = gdb_parser.add_subparsers( |
| 298 help='Commands to GDB') | 298 help='Commands to GDB') |
| 299 | 299 |
| 300 gdb_attach_parser = gdb_subparser.add_parser( | 300 gdb_attach_parser = gdb_subparser.add_parser( |
| (...skipping 20 matching lines...) Expand all Loading... |
| 321 _add_device_command(subparsers) | 321 _add_device_command(subparsers) |
| 322 _add_tracing_command(subparsers) | 322 _add_tracing_command(subparsers) |
| 323 _add_wm_command(subparsers) | 323 _add_wm_command(subparsers) |
| 324 _add_gdb_command(subparsers) | 324 _add_gdb_command(subparsers) |
| 325 | 325 |
| 326 args = parser.parse_args() | 326 args = parser.parse_args() |
| 327 return args.func(args) | 327 return args.func(args) |
| 328 | 328 |
| 329 if __name__ == '__main__': | 329 if __name__ == '__main__': |
| 330 sys.exit(main()) | 330 sys.exit(main()) |
| OLD | NEW |