Question

I've built my application as an x86 native app, and I've ran it on Genymotion. The problem occurs when I try to debug from Eclipse. In the console view, I get the age old:

gdbserver output:
run-as: exec failed for lib/gdbserver Error:No such file or directory
Verify if the application was built with NDK_DEBUG=1

It all works fine with ARM builds though. I checked that the x86 gdbserver is getting included in my .apk lib/x86/gdbserver. I've also read that the x86 versions of android include a gdbserver locally anyway, so not sure what the point of all that is.

I've been able to manually attach the included gdbserver using adb shell, and then get Eclipse to attach to it remotely using this is a starting point: How to get ndk-gdb working on Android? It doesn't mention anything about x86 or Genymotion though. Unfortunately, it's tedious, and it's seemingly useless since it doesn't load any symbols (though that's probably because of my ignorance.)

Is there any guidance for making this setup, using Eclipse and Genymotion to debug native apps, work?

Était-ce utile?

La solution

Sadly, this is due to a bug in Genymotion v2.2
It will be fixed on our next release (I work for Genymotion).

You are right, gdbserver is not deployed from the apk, and this is why it doesn't work.

You can find here a patch to apply that will fix this apk deployment bug for Genymotion KitKat devices created with Genymotion 2.2: native-debug-fix.kitkat.zip

Warning this patch is only for:

  • Kitkat (Android 4.4.2) devices
  • created with genymotion v2.2

Don't apply the patch on other devices, it will brake things.

to apply the patch, simply drag n'drop the zip file on genymotion.

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