aboutsummaryrefslogtreecommitdiff
path: root/ndk-gdb
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2012-02-14 02:43:52 +0100
committerDavid 'Digit' Turner <digit@google.com>2012-02-14 02:43:52 +0100
commitff7cd04c9fb4fc916998f7b2735ef75b839cbef5 (patch)
tree84e393ddc7392368b022536f27083926ec861161 /ndk-gdb
parent64f5aa49e372cc5465f25c494ce0e1b419cde4cd (diff)
downloadndk-ff7cd04c9fb4fc916998f7b2735ef75b839cbef5.tar.gz
Custom output directory support with NDK_OUT
This patch allows the use of the NDK_OUT environment variable to specify a custom output directory for all intermediate generated files (i.e. instead of $PROJECT_PATH/obj). ndk-gdb will pick up the right location if the variable is defined too. Note that final binaries are still placed under $PROJECT_PATH/libs by default since the packaging scripts expect them to be here. This fixes http://code.google.com/p/android/issues/detail?id=25470 Change-Id: I50618df619c13f5208200f8d0902b8e4fe201de8
Diffstat (limited to 'ndk-gdb')
-rwxr-xr-xndk-gdb20
1 files changed, 10 insertions, 10 deletions
diff --git a/ndk-gdb b/ndk-gdb
index d812a9359..2322a592b 100755
--- a/ndk-gdb
+++ b/ndk-gdb
@@ -509,6 +509,16 @@ if [ "$COMPAT_ABI" = none ] ; then
fi
log "Compatible device ABI: $COMPAT_ABI"
+# Get information from the build system
+GDBSETUP_INIT=`get_build_var_for_abi NDK_APP_GDBSETUP $COMPAT_ABI`
+log "Using gdb setup init: $GDBSETUP_INIT"
+
+TOOLCHAIN_PREFIX=`get_build_var_for_abi TOOLCHAIN_PREFIX $COMPAT_ABI`
+log "Using toolchain prefix: $TOOLCHAIN_PREFIX"
+
+APP_OUT=`get_build_var_for_abi TARGET_OUT $COMPAT_ABI`
+log "Using app out directory: $APP_OUT"
+
# Check that the application is debuggable, or nothing will work
DEBUGGABLE=`run_awk_manifest_script extract-debuggable.awk`
log "Found debuggable flag: $DEBUGGABLE"
@@ -553,16 +563,6 @@ if [ $? != 0 ]; then
fi
log "Found device gdbserver: $DEVICE_GDBSERVER"
-# Get information from the build system
-GDBSETUP_INIT=`get_build_var_for_abi NDK_APP_GDBSETUP $COMPAT_ABI`
-log "Using gdb setup init: $GDBSETUP_INIT"
-
-TOOLCHAIN_PREFIX=`get_build_var_for_abi TOOLCHAIN_PREFIX $COMPAT_ABI`
-log "Using toolchain prefix: $TOOLCHAIN_PREFIX"
-
-APP_OUT=`get_build_var_for_abi TARGET_OUT $COMPAT_ABI`
-log "Using app out directory: $APP_OUT"
-
# Find the <dataDir> of the package on the device
adb_var_shell2 DATA_DIR run-as $PACKAGE_NAME /system/bin/sh -c pwd
if [ $? != 0 -o -z "$DATA_DIR" ] ; then