am 1a03ddb8: am 09a4cac1: am 7cc3174d: Merge "Removed /system/bin prefix from gdbclient."

* commit '1a03ddb805f2efc45345aa545d1d724e75972ae7':
  Removed /system/bin prefix from gdbclient.
This commit is contained in:
Elliott Hughes 2014-06-18 01:54:56 +00:00 committed by Android Git Automerger
commit 9b0bae3b37
1 changed files with 10 additions and 9 deletions

View File

@ -966,6 +966,11 @@ function gdbwrapper()
$GDB_CMD -x "$@"
}
function get_symbols_directory()
{
echo $(get_abs_build_var TARGET_OUT_UNSTRIPPED)
}
# process the symbolic link of /proc/$PID/exe and use the host file tool to
# determine whether it is a 32-bit or 64-bit executable. It returns "" or "64"
# which can be conveniently used as suffix.
@ -973,14 +978,9 @@ function is64bit()
{
local PID="$1"
if [ "$PID" ] ; then
local EXE=`adb shell ls -l /proc/$PID/exe \
| tr -d '\r' \
| cut -d'>' -f2 \
| tr -d ' ' \
| cut -d'/' -f4`
local OUT_EXE_SYMBOLS=$(get_abs_build_var TARGET_OUT_EXECUTABLES_UNSTRIPPED)
local IS64BIT=`file $OUT_EXE_SYMBOLS/$EXE | grep "64-bit"`
local EXE=`adb shell readlink /proc/$PID/exe`
local EXE_DIR=`get_abs_build_var PRODUCT_OUT`
local IS64BIT=`file "$EXE_DIR$EXE" | grep "64-bit"`
if [ "$IS64BIT" != "" ]; then
echo "64"
else
@ -1000,7 +1000,7 @@ function gdbclient()
local OUT_SYMBOLS=$(get_abs_build_var TARGET_OUT_UNSTRIPPED)
local OUT_SO_SYMBOLS=$(get_abs_build_var TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED)
local OUT_VENDOR_SO_SYMBOLS=$(get_abs_build_var TARGET_OUT_VENDOR_SHARED_LIBRARIES_UNSTRIPPED)
local OUT_EXE_SYMBOLS=$(get_abs_build_var TARGET_OUT_EXECUTABLES_UNSTRIPPED)
local OUT_EXE_SYMBOLS=$(get_symbols_directory)
local PREBUILTS=$(get_abs_build_var ANDROID_PREBUILTS)
local ARCH=$(get_build_var TARGET_ARCH)
local GDB
@ -1080,6 +1080,7 @@ function gdbclient()
else
WHICH_GDB=$ANDROID_TOOLCHAIN_2ND_ARCH/$GDB
fi
gdbwrapper $WHICH_GDB "$OUT_ROOT/gdbclient.cmds" "$OUT_EXE_SYMBOLS/$EXE"
else
echo "Unable to determine build system output dir."