Debugging with ndk-gdb and samsung galaxy device

82 views
Skip to first unread message

Ben

unread,
Oct 7, 2010, 4:48:03 PM10/7/10
to android-ndk
Hello everyone!

I want to debug my native code.
Therefore I setup my environment according to this tutorial:
http://www.eclipse.org/sequoyah/documentation/native_debug.php

If I use the emulator everything works fine (but slow as usual...).

If I use my phone (Samsung GT-19000) I cannot connect to the device as
I did it before.
I tried setting the port by
ndk-gdb --port=5039
and forwarding the port to the device through
adb forward tcp:5039 dev:<device-number>
but nothing worked.

If I try connecting to the device LogCat gives me the following
output:

10-08 22:45:13.649: DEBUG/AndroidRuntime(20227): >>>>>>>>>>>>>>
AndroidRuntime START <<<<<<<<<<<<<<
10-08 22:45:13.649: DEBUG/AndroidRuntime(20227): CheckJNI is OFF
10-08 22:45:13.657: DEBUG/AndroidRuntime(20227): setted country_code =
Korea
10-08 22:45:13.657: DEBUG/AndroidRuntime(20227): setted sales_code =
KOR
10-08 22:45:13.657: DEBUG/AndroidRuntime(20227): found sales_code tag
= <KOR>, </KOR>
10-08 22:45:13.666: DEBUG/dalvikvm(20227): creating instr width table
10-08 22:45:13.700: DEBUG/AndroidRuntime(20227): --- registering
native functions ---
10-08 22:45:13.864: INFO/ActivityManager(2459): Starting activity:
Intent { flg=0x10000000
cmp=de.berlin.htw.project.s0522031.imgsorter.app/.activity.SplashScreen }
10-08 22:45:14.352: DEBUG/AndroidRuntime(20227): Shutting down VM
10-08 22:45:14.356: DEBUG/dalvikvm(20227): Debugger has detached;
object registry had 1 entries
10-08 22:45:14.375: INFO/AndroidRuntime(20227): NOTE: attach of thread
'Binder Thread #3' failed


I anybody went through this before I would really appreciate some
tips.

Cheers,

Ben

Tim Mensch

unread,
Oct 7, 2010, 5:02:46 PM10/7/10
to andro...@googlegroups.com
On 10/7/2010 2:48 PM, Ben wrote:
> If I use my phone (Samsung GT-19000) I cannot connect to the device as
> I did it before.
Silly question, but does it have Android 2.2? A quick Google finds that
2.2 was delayed for that phone. You said you did it before, so I guess
it must, but I had to ask.

Tim

Ben

unread,
Oct 7, 2010, 5:14:47 PM10/7/10
to android-ndk
Yup, it has 2.2 on it (well, it's the Froyo Beta, but nevertheless I
just assumed that should do).
With "as I did it before" I meant the emulator that I connected to
before.
Reply all
Reply to author
Forward
0 new messages