Reputation: 2200
Seems like ndk-build strips debug symbols when it copies .so from obj to lib folder. Is there a way to tell ndk-build not to strip the debug symbols?
Upvotes: 10
Views: 9014
Reputation: 491
According to https://github.com/android/ndk/wiki/Changelog-r18-beta2
APP_STRIP_MODE
in Application.mk
of your NDK applicationifeq ($(NDK_DEBUG),1)
APP_STRIP_MODE := none
endif
LOCAL_STRIP_MODE
in Android.mk
of your NDK moduleifeq ($(NDK_DEBUG),1)
LOCAL_STRIP_MODE := none
endif
Upvotes: 1
Reputation: 883
Adding this to Application.mk
solved it for me:
APP_STRIP_MODE := none
So, taking suggestions from @Michael and @gmetal:
ifeq ($(NDK_DEBUG),1)
APP_STRIP_MODE := none
endif
Upvotes: 2
Reputation: 58447
In your Android.mk you could override cmd-strip
to do what you want, e.g. nothing:
# Don't strip debug builds
ifeq ($(APP_OPTIM),debug)
cmd-strip :=
endif
Upvotes: 17