Debugging native code in Android on the *device* (not emulator)

Dabbler picture Dabbler · Dec 11, 2011 · Viewed 7.1k times · Source

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.

Answer

android.weasel picture android.weasel · Dec 14, 2011

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/