I am trying to use ndk-gdb to debug my native Android project. When I run the ndk-gdb command, I get an error
Could not find gdb.setup under ./libs/
Explanation
- Launch MacOSX, ndk r10e; Using Sample Ndk San Angeles
- The following steps are for setting up your own debugging https://developer.android.com/ndk/guides/ndk-gdb.html
- Basically I set android: debuggable = "true", APP_OPTIM: = debug and the built-in native using ndk-build NDK_DEBUG = 1 (these 3 settings may be redundant, but just in case)
- It uses ant debug, adb install to install; Ran app and app work great
Running ndk-gdb --verbose produces
ndk-gdb --verbose
Android NDK installation path:
/Users/hanantha/Documents/Dev/android-ndk-r10e
Using adb command by default:
/Users/hanantha/Documents/Dev/android-sdk-macosx/platform-tools/adb
ADB version found: Android Debug Bridge version 1.0.32
Revision eac51f2bb6a8-android
ADB:
JDB:
/usr/bin/jdb
:.
: com.example.SanAngeles
ABI, : arm64-v8a armeabi armeabi-v7a armeabi-v7a mips mips64 x86 x86_64
API- : 19
CPU CPU ABI: x86
ABI:
gdb setup init:
./libs/armeabi/gdb.setup
toolchain:
/Users/hanantha/Documents/Dev/android-ndk-r10e/toolchains/x86-4.8/prebuilt/darwin-x86_64/bin/i686-linux-android-
:./obj/local/armeabi
: true
:
Could not find gdb.setup under ./libs/
This usually means you modified your AndroidManifest.xml to set
the android:debuggable flag to 'true' but did not rebuild the
native binaries. Please call 'ndk-build' to do so,
*then* re-install to the device!