First, I already read 3 or 4 tutorials, 20 related questions on stack overflow, I am desperate, nothing seems to work…
I run on mac os x, on eclipse juno, ndk-r8
I try to debug an application (.apk) that use a library (.jar), that use many native library (.so).
My 2 AndroidManifest.xml contains debuggable=true, i compile the .so with “ndk-build NDK_DEBUG=1”
but when i call “ndk-gdb”, on the application directory, I get:
"ERROR: Could not find gdbserver binary under ./libs/none"
(which seems normal)
and in the library directory, i get:
"ERROR: Non-debuggable application installed on the target device."
(which is false)
when my program crash with a segv, if I use addr2line or ndk-stack, both says that my address is incorrect.
does anyone as an idea why gdb cannot attach to my process ? or have a workaround to do this ?
As I said earlier in comments:
ndk-gdb cannot attach to a process where the jni is inside an android library project.
As a workaround, you can put a mock main entry point in the library,
to transform it into a executable project, to execute it in debug mode.