summaryrefslogtreecommitdiffstats
path: root/mandoline
diff options
context:
space:
mode:
authorsky <sky@chromium.org>2015-05-22 12:17:06 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-22 19:18:05 +0000
commit2c7d24cd78f53c232d0c80585e8129f854af1f43 (patch)
treeb392c64191e8c394a4b5167dafb73120e7c535d4 /mandoline
parentae33dcfdacba6c4a0bceb6733f9afd8248fb9ca3 (diff)
downloadchromium_src-2c7d24cd78f53c232d0c80585e8129f854af1f43.zip
chromium_src-2c7d24cd78f53c232d0c80585e8129f854af1f43.tar.gz
chromium_src-2c7d24cd78f53c232d0c80585e8129f854af1f43.tar.bz2
Makes android.py support gdb
The gdb dance is a bit cryptic. I have to do the following: . remap local port to remote port (this really only needs to be done once) . wait to figure out process id once started on device. . Start gdbserver on device. . Start gdb on local device. Additionally the names of the shared libraries don't align, eg we end up with html_viewer.mojo on disk but the library that comes from it is html_viewer_library.so. For this reason I create a temp directory and point the local gdb at it, creating links to the real files. R=msw@chromium.org BUG=none TEST=none Review URL: https://codereview.chromium.org/1152663002 Cr-Commit-Position: refs/heads/master@{#331146}
Diffstat (limited to 'mandoline')
-rwxr-xr-xmandoline/tools/android_run_mandoline.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/mandoline/tools/android_run_mandoline.py b/mandoline/tools/android_run_mandoline.py
index a68f3e6..f0481a3 100755
--- a/mandoline/tools/android_run_mandoline.py
+++ b/mandoline/tools/android_run_mandoline.py
@@ -30,6 +30,11 @@ def main():
parser.add_argument('--target-cpu', help='CPU architecture to run for.',
choices=['x64', 'x86', 'arm'], default='arm')
parser.add_argument('--target-device', help='Device to run on.')
+ parser.add_argument('--dont-install',
+ help='Disables installing the apk',
+ default=False, action='store_true')
+ parser.add_argument('--gdb', help='Run gdb',
+ default=False, action='store_true')
launcher_args, args = parser.parse_known_args()
config = Config(target_os=Config.OS_ANDROID,
@@ -39,14 +44,16 @@ def main():
paths = Paths(config)
shell = AndroidShell(paths.apk_path, paths.build_dir, paths.adb_path,
launcher_args.target_device,
- target_package='org.chromium.mandoline')
+ target_package='org.chromium.mandoline',
+ src_root=paths.src_root)
- extra_shell_args = shell.PrepareShellRun()
+ extra_shell_args = shell.PrepareShellRun(
+ install=not launcher_args.dont_install, gdb=launcher_args.gdb)
args.extend(extra_shell_args)
shell.CleanLogs()
p = shell.ShowLogs()
- shell.StartShell(args, sys.stdout, p.terminate)
+ shell.StartShell(args, sys.stdout, p.terminate, launcher_args.gdb)
return 0