debugging native code (C++) using gdb on android with Eclipse. Is it possible?
I have some piece of code which uses JNI. I can debug code wrote in Java directly in Eclipse (using ADT). I even have a script, which help me debug native code with gdb. 开发者_Go百科However this is not very comfortable way for doing this.
Is it possible to configure Eclipse to use gdb (I guess gdbserver) for debbuging android native applications? Do you know where I could find any description of this?
according to the release notes from Android 2.2 NDK - you can now debug on device native code. please refer to the NDK docs, since I didn't try this myself.
It depends whether you want to debug JNI code you have written using NDK apis vs native code in AOSP applications.
For the former case, use NDK debugging tools. For the latter, you need to have right version of gdbserver and gdb. The session needs to be configured with gdb script to find symbols for AOSP libs. Please check Debugging AOSP native applications link for step by step tutorial.
精彩评论