I want to debug the JNI_OnLoad function in a shared library (libtest.so) without source code.
I started the app with -D option using am start -D -n com.xx.xxxx/.MainActivity,then the app waited the debugger to connect.But when I connected to it using gdbserver and target remote :12345,it just quited with a core-dump.
(gdb) target remote :12345
Remote debugging using :12345
Cannot access memory at address 0x2a
0x4007f908 in ?? ()
[1] 29644 abort (core dumped)
Is there any way to debug JNI_OnLoad using gdb?