diff options
author | Andreas Gampe <agampe@google.com> | 2015-04-03 15:02:18 -0700 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2015-04-06 13:29:57 -0700 |
commit | 512cc91be2cce9566807bd7248da448c0a91e2ed (patch) | |
tree | d5edba551fb80c2d7d73d12432f5023af389d789 | |
parent | 630b075cdb4299e72d26d8cb355a28c342479201 (diff) | |
download | android_development-512cc91be2cce9566807bd7248da448c0a91e2ed.tar.gz android_development-512cc91be2cce9566807bd7248da448c0a91e2ed.tar.bz2 android_development-512cc91be2cce9566807bd7248da448c0a91e2ed.zip |
Development/scripts: Update gdbclient for native bridge
The Nexus Player has a mixed abi-list, but native applications are
still x86. Move x86 ahead to prefer it over arm.
Change-Id: I3e2f3dc0da97b94078f7fd5dc3fede711603961a
-rwxr-xr-x | scripts/gdbclient | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/gdbclient b/scripts/gdbclient index b6a74c20d..51139773c 100755 --- a/scripts/gdbclient +++ b/scripts/gdbclient @@ -127,19 +127,24 @@ function gdbclient() { local GDB= local GDB64= local CPU_ABI=`adb shell getprop ro.product.cpu.abilist | sed s/.$//` + # TODO: Derive this differently to correctly support multi-arch. We could try to parse + # /proc/pid/exe. Right now, we prefer 64bit by checking those entries first. + # TODO: Correctly support native bridge, which makes parsing abilist very brittle. + # Note: Do NOT sort the entries alphabetically because of this. Fugu's abilist is + # "x86,armeabi-v7a,armeabi", and we need to grab the "x86". # TODO: we assume these are available via $PATH if [[ $CPU_ABI =~ (^|,)arm64 ]]; then GDB=arm-linux-androideabi-gdb GDB64=aarch64-linux-android-gdb - elif [[ $CPU_ABI =~ (^|,)arm ]]; then - GDB=arm-linux-androideabi-gdb elif [[ $CPU_ABI =~ (^|,)x86_64 ]]; then GDB=x86_64-linux-android-gdb - elif [[ $CPU_ABI =~ (^|,)x86 ]]; then - GDB=x86_64-linux-android-gdb elif [[ $CPU_ABI =~ (^|,)mips64 ]]; then GDB=mipsel-linux-android-gdb GDB64=mips64el-linux-android-gdb + elif [[ $CPU_ABI =~ (^|,)x86 ]]; then # See note above for order. + GDB=x86_64-linux-android-gdb + elif [[ $CPU_ABI =~ (^|,)arm ]]; then + GDB=arm-linux-androideabi-gdb elif [[ $CPU_ABI =~ (^|,)mips ]]; then GDB=mipsel-linux-android-gdb else |