diff options
author | penghuang <penghuang@chromium.org> | 2015-07-08 11:48:12 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-08 18:48:51 +0000 |
commit | 65228f948bc2cd9b048f5a0adcdc765f7c049deb (patch) | |
tree | 8b46f81fd86cafa6c64efbe29fca0bb0d3cb991a /mojo/tools | |
parent | d4df0076f103622fa2de084377485edc788fed47 (diff) | |
download | chromium_src-65228f948bc2cd9b048f5a0adcdc765f7c049deb.zip chromium_src-65228f948bc2cd9b048f5a0adcdc765f7c049deb.tar.gz chromium_src-65228f948bc2cd9b048f5a0adcdc765f7c049deb.tar.bz2 |
mojo: Make gdb work with Android x86 & x86_64 image running in Emulator.
BUG=None
TBR=ben@chromium.org
Review URL: https://codereview.chromium.org/1214723005
Cr-Commit-Position: refs/heads/master@{#337870}
Diffstat (limited to 'mojo/tools')
-rw-r--r-- | mojo/tools/mopy/android.py | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/mojo/tools/mopy/android.py b/mojo/tools/mopy/android.py index ad75852..ec275db 100644 --- a/mojo/tools/mopy/android.py +++ b/mojo/tools/mopy/android.py @@ -51,6 +51,7 @@ class AndroidShell(object): """ def __init__(self, config): self.adb_path = constants.GetAdbPath() + self.config = config self.paths = Paths(config) self.device = None self.shell_args = [] @@ -181,10 +182,20 @@ class AndroidShell(object): def _GetLocalGdbPath(self): """Returns the path to the android gdb.""" - return os.path.join(self.paths.src_root, "third_party", "android_tools", - "ndk", "toolchains", "arm-linux-androideabi-4.9", - "prebuilt", "linux-x86_64", "bin", - "arm-linux-androideabi-gdb") + if self.config.target_cpu == "arm": + return os.path.join(constants.ANDROID_NDK_ROOT, "toolchains", + "arm-linux-androideabi-4.9", "prebuilt", + "linux-x86_64", "bin", "arm-linux-androideabi-gdb") + elif self.config.target_cpu == "x86": + return os.path.join(constants.ANDROID_NDK_ROOT, "toolchains", + "x86-4.9", "prebuilt", "linux-x86_64", "bin", + "i686-linux-android-gdb") + elif self.config.target_cpu == "x64": + return os.path.join(constants.ANDROID_NDK_ROOT, "toolchains", + "x86_64-4.9", "prebuilt", "linux-x86_64", "bin", + "x86_64-linux-android-gdb") + else: + raise Exception("Unknown target_cpu: %s" % self.config.target_cpu) def _WaitForProcessIdAndStartGdb(self, process): """ |