Question

I followed this description for debugging native code in an Android app and it works when debugging on the emulator.

When I want to debug on the actual device, at the point where I switch to the C/C++ debug configuration, Eclipse reports "Remote communication error: Bad file descriptor.". Apparently there's a problem reaching GdbServer (I guess). I suppose all that's missing is a small tweak to the debug configuration. Unfortunately, I don't yet really understand how the whole setup works, so I'm unable to pinpoint/solve the problem. Any help would really be appreciated.

Était-ce utile?

La solution

You can get that error if you don't run ndk-gdb to start gdbserver on the device. Here a link to an explaination of how the android remote debugging works: http://mhandroid.wordpress.com/2011/01/25/how-cc-debugging-works-on-android/

Autres conseils

Assuming you're on an ARM Android, you may have better luck with the free ARM-supplied Android debugger: http://ds.arm.com/ds-5-community-edition/

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top