mirror of
https://github.com/golang/go
synced 2024-11-21 20:34:40 -07:00
arm: add gdb support to android launcher script
R=rsc CC=golang-dev https://golang.org/cl/1742050
This commit is contained in:
parent
fdbff04a94
commit
96ad9adef3
@ -39,6 +39,14 @@ echo RETVAL: $?'
|
||||
fi
|
||||
|
||||
# run the main binary
|
||||
if [ "-g" == "$1" ]; then
|
||||
adb forward tcp:$2 tcp:$2
|
||||
args=$(echo $*| cut -d' ' -f4-)
|
||||
adb push $3 /data/local/tmp/$3 >/dev/null 2>&1
|
||||
adb shell "$(exp GOARCH) $(exp GOTRACEBACK) $(exp GOGC) \
|
||||
gdbserver :$2 /data/local/tmp/retval /data/local/tmp/$3 $args" \
|
||||
2>&1|tr -d '\r' |tee /tmp/adb.out|grep -v RETVAL
|
||||
else
|
||||
if [ "$*" != "$1" ]; then
|
||||
args=$(echo $*| cut -d' ' -f2-)
|
||||
fi
|
||||
@ -46,4 +54,5 @@ adb push $1 /data/local/tmp/$1 >/dev/null 2>&1
|
||||
adb shell "$(exp GOARCH) $(exp GOTRACEBACK) $(exp GOGC) \
|
||||
/data/local/tmp/retval /data/local/tmp/$1 $args" \
|
||||
2>&1|tr -d '\r' |tee /tmp/adb.out|grep -v RETVAL
|
||||
fi
|
||||
exit $(grep RETVAL /tmp/adb.out|tr -d '\n\r'| cut -d' ' -f2)
|
||||
|
Loading…
Reference in New Issue
Block a user