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

Side by Side Diff: mandoline/tools/android_run_mandoline.py

Issue 1152663002: Makes android.py support gdb (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review feedback and symbols Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | mojo/tools/mopy/android.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 logging 7 import logging
8 import os 8 import os
9 import sys 9 import sys
10 10
(...skipping 12 matching lines...) Expand all
23 parser = argparse.ArgumentParser(usage=USAGE) 23 parser = argparse.ArgumentParser(usage=USAGE)
24 24
25 debug_group = parser.add_mutually_exclusive_group() 25 debug_group = parser.add_mutually_exclusive_group()
26 debug_group.add_argument('--debug', help='Debug build (default)', 26 debug_group.add_argument('--debug', help='Debug build (default)',
27 default=True, action='store_true') 27 default=True, action='store_true')
28 debug_group.add_argument('--release', help='Release build', default=False, 28 debug_group.add_argument('--release', help='Release build', default=False,
29 dest='debug', action='store_false') 29 dest='debug', action='store_false')
30 parser.add_argument('--target-cpu', help='CPU architecture to run for.', 30 parser.add_argument('--target-cpu', help='CPU architecture to run for.',
31 choices=['x64', 'x86', 'arm'], default='arm') 31 choices=['x64', 'x86', 'arm'], default='arm')
32 parser.add_argument('--target-device', help='Device to run on.') 32 parser.add_argument('--target-device', help='Device to run on.')
33 parser.add_argument('--dont-install',
34 help='Disables installing the apk',
35 default=False, action='store_true')
36 parser.add_argument('--gdb', help='Run gdb',
37 default=False, action='store_true')
33 launcher_args, args = parser.parse_known_args() 38 launcher_args, args = parser.parse_known_args()
34 39
35 config = Config(target_os=Config.OS_ANDROID, 40 config = Config(target_os=Config.OS_ANDROID,
36 target_cpu=launcher_args.target_cpu, 41 target_cpu=launcher_args.target_cpu,
37 is_debug=launcher_args.debug, 42 is_debug=launcher_args.debug,
38 apk_name="Mandoline.apk") 43 apk_name="Mandoline.apk")
39 paths = Paths(config) 44 paths = Paths(config)
40 shell = AndroidShell(paths.apk_path, paths.build_dir, paths.adb_path, 45 shell = AndroidShell(paths.apk_path, paths.build_dir, paths.adb_path,
41 launcher_args.target_device, 46 launcher_args.target_device,
42 target_package='org.chromium.mandoline') 47 target_package='org.chromium.mandoline',
48 src_root=paths.src_root)
43 49
44 extra_shell_args = shell.PrepareShellRun() 50 extra_shell_args = shell.PrepareShellRun(
51 install=not launcher_args.dont_install, gdb=launcher_args.gdb)
45 args.extend(extra_shell_args) 52 args.extend(extra_shell_args)
46 53
47 shell.CleanLogs() 54 shell.CleanLogs()
48 p = shell.ShowLogs() 55 p = shell.ShowLogs()
49 shell.StartShell(args, sys.stdout, p.terminate) 56 shell.StartShell(args, sys.stdout, p.terminate, launcher_args.gdb)
50 return 0 57 return 0
51 58
52 59
53 if __name__ == "__main__": 60 if __name__ == "__main__":
54 sys.exit(main()) 61 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | mojo/tools/mopy/android.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698