3

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. 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?

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Strictly this in Android NDK r4 which was released at the same time as Android 2.2 but this is right. You can find the docs here: developer.android.com/intl/de/sdk/ndk/index.html
1

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.