8

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.

Dabbler
  • 9,733
  • 5
  • 41
  • 64

2 Answers2

2

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/

android.weasel
  • 3,343
  • 1
  • 30
  • 41
1

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/

Tod
  • 4,618
  • 4
  • 32
  • 23