Hello Kevin and David,
Is there any news on this issue? I think I have the same problem
(running Snow Leopard with a N1 froyo device). I get the same error
but the process is not crashing, it just continues to run fine on N1.
It's not a stock froyo but as far as I can look the problem is not
related to the phone's image but rather with the gdbserver binary
going in the lib folder of my application.
As I can see from "ndk-gdb --verbose" the scripts calls this line at a
moment:
adb shell run-as
com.my.app lib/gdbserver +debug-socket --attach
the output for this line is the following:
Usage: gdbserver COMM PROG [ARGS ...]
gdbserver COMM --attach PID
COMM may either be a tty device (for serial debugging), or
HOST:PORT to listen for a TCP connection.
As far as I can figure it out the gdbserver is not starting because
the arguments are not right and this goes to the broken pipe error in
the gdb client.
Any suggestions?
Thanks for any info.
Here is the whole gdb-ndk --verbose output:
Android NDK installation path: /Users/handrei/android/android-ndk-r4
Using default adb command: /Users/handrei/android/android-sdk-mac/
tools/adb
ADB version found: Android Debug Bridge version 1.0.26
Using final ADB command: '/Users/handrei/android/android-sdk-mac/tools/
adb'
Using auto-detected project path: .
Found package name: com.revo.sog
Found debuggable flag: true
ABIs targetted by application: armeabi-v7a
Device CPU ABIs: armeabi-v7a armeabi
Compatible device ABI: armeabi
Found device gdbserver: /data/data/com.revo.sog/lib/gdbserver
Using gdb setup init: /Users/handrei/android/android-ndk-r4/apps/sog/
project/libs/armeabi/gdb.setup
Using toolchain prefix: /Users/handrei/android/android-ndk-r4/build/
prebuilt/darwin-x86/arm-eabi-4.4.0/bin/arm-eabi-
Using app out directory: /Users/handrei/android/android-ndk-r4/apps/
sog/project/bin/ndk/local/armeabi
Found data directory: '/data/data/com.revo.sog'
Found first launchable activity: .SOGActivity
Launching activity: com.revo.sog/.SOGActivity
##### NEW COMMAND
/Users/handrei/android/android-sdk-mac/tools/adb shell am start -n
com.revo.sog/.SOGActivity
Starting: Intent { cmp=com.revo.sog/.SOGActivity }
##### NEW COMMAND
/Users/handrei/android/android-sdk-mac/tools/adb shell sleep 1
awk: calling undefined function gensub
source line number 33
Found running PID:
Launched gdbserver succesfully.
Setup network redirection
##### NEW COMMAND
/Users/handrei/android/android-sdk-mac/tools/adb forward tcp:5039
localfilesystem:/data/data/com.revo.sog/debug-socket
##### NEW COMMAND
/Users/handrei/android/android-sdk-mac/tools/adb shell run-as
com.revo.sog lib/gdbserver +debug-socket --attach
##### NEW COMMAND
adb pull /system/bin/app_process /Users/handrei/android/android-ndk-r4/
apps/sog/project/bin/ndk/local/armeabi/app_process
Usage: gdbserver COMM PROG [ARGS ...]
gdbserver COMM --attach PID
COMM may either be a tty device (for serial debugging), or
HOST:PORT to listen for a TCP connection.
534 KB/s (5680 bytes in 0.010s)
Pulled from device/emulator.
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "--host=i386-apple-darwin9.8.0 --target=arm-
elf-linux".
/Users/handrei/android/android-ndk-r4/apps/sog/project/bin/ndk/local/
armeabi/gdb.setup:4: Error in sourced command file:
Remote communication error: Connection reset by peer.
(gdb)
> ...
>
> read more »