Gdbserver Debugger Low-level call C + + dynamic library, dynamic library with debug options to view mobile IP 192.168.1.177The C + + library that the package calls is under the/data/data/package name/lib/
1, the Android NDK directory/usr/local/src/android-ndk-r9d/prebuilt/android-arm/gdbserver/gdbserver under win via ADB push to/data/local/ tmp/Directory 2, enter the Linux PC with the Ndk-build compiled environment, set up a debug directory, in the debug directory to add a gdb directory, (DEBUG/GDB) 3, can be under the Debug/gdb directory under the win system through the ADB: ADB pull/system/lib, ADB pull/system/bin/app_process, will invoke the dynamic library mv libblcp_app.so debug/gdb/, MV libblcp_app.so D EBUG/GDB/4,/usr/local/src/android-ndk-r9d/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/ Arm-linux-androideabi-gdb boot (the type of gdb chosen here is consistent with the gdbserver on the phone) 5, FILE/HOME/*/*/DEBUG/GDB/APP_PROCESS6, set SOLIB-SEARCH-PATH/HOME/*/*/DEBUG/GDB7, adb shell, Su, am start-a android.intent.action.main-n org.bl/org.bl.apjsuaact Ivity start then PS View ORG.BL package name Process PID (ORG.BL is the Java package name, apjsuaactivity is the class name ) 8,/data/local/tmp/gdbserver:1234--attach pid9, enter the GDB environment that started on the PC, target remote 192.168.1.177:1234 10, C continue to perform 11, operate on the phone, watch GDB program execution, can also break point
Can be combined with Logcat to view program performance