3

I've used ndk-gdb for shared libraries loaded in JNI context. Is it possible to use it to debug pure native executables, built with BUILD_EXECUTABLE target in Android.mk?

1 Answer 1

4

You can use gdbserver to start or attach to a process.

// Start debugger and attach to a running process
adb forward tcp:5039 tcp:5039
adb shell /system/bin/gdbserver tcp:5039 --attach PID

If you correctly configure your Eclipse environment you can debug directly from Eclipse. Below are some links I found that helped me out.

General Debugging:
http://mhandroid.wordpress.com/2011/01/25/how-cc-debugging-works-on-android/

Setting up eclipse:
http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-debugging/

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

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.