I have an android project created by Android Studio 2.2.3 under Windows 10, this project use a native library through its wrapper jar (through JNI). The native library was built outside of Android Studio by qmake, which will use GCC 4.9 in android NDK r13b to generate the native shared library, the code was compiled with -g
option.
To use this native library, I put the wrapper jar under <proj_path>/app/libs
directory and the native library under <proj_path>/app/src/main/jniLibs/armeabi-v7a
, everything works fine, I can successfully call the method implemented in the native library from java code.
The problem is that when I debug this android project, the breakpoint I set in the cpp file doesn't take effect, please note that the cpp file is not in the source tree of the android project, I just open it from android studio. I have installed the latest LLDB and I start debug with 'Hybrid' debug type, I also use 'image list' LLDB command to confirm that the native library image loaded when debugging is the unstripped version. But the breakpoint just won't hit.
What is wrong with my configuration?
Can somebody give me some suggestion?
Thanks!