Posts

Showing posts from February, 2012

A binary with debug symbols with the Android NDK

First go into the Android.mk file in your jni folder and add this line: LOCAL_CFLAGS  += -g This is going to enable the debug compile option. You might have a separate option for logging more data. Next go into Application.mk and uncomment this line: APP_OPTIM := debug (or add it if it isnt there) This should be sufficient. Now when you run the ndk-build (You can run ndk-build V=1 to enable the verbose option), you should get the debuggable binaries. For some reason the binary I get in the libs/armeabi folder is not the debuggable one, this one has its debug options stripped out. To get the debug one grab it from obj/local/armeabi.