hi
I have problem with using NDK-GDB.
I use build_native.sh to compile C++, Its content is:
-- set params
NDK_ROOT=/cygdrive/c/Android-NDK
COCOS2DX_ROOT=/cygdrive/g/Game/cocos2d-12
GAME_ROOT=$COCOS2DX_ROOT/BeFastOrBeDead
GAME_ANDROID_ROOT=$GAME_ROOT/android
RESOURCE_ROOT=$GAME_ROOT/Resources
-- make sure assets is exist
if [ -d $GAME_ANDROID_ROOT/assets ]; then
rm -rf $GAME_ANDROID_ROOT/assets
fi
mkdir $GAME_ANDROID_ROOT/assets
-- copy resources
for file in $RESOURCE_ROOT/*
do
if [ -d $file ]; then
cp -rf $file $GAME_ANDROID_ROOT/assets
fi
if [ -f $file ]; then
cp $file $GAME_ANDROID_ROOT/assets
fi
done
-- build
$NDK_ROOT/ndk-build NDK_DEBUG=1 -C $GAME_ANDROID_ROOT $*
But whene I try to use GDB like this:
@ cd /cygdrive/g/game/cocos2d-12/MyGame/android
/cygdrive/c/android-ndk/ndk-gdb —adb=/cygdrive/c/android-sdk/platform-tools/adb@
, it say:
Could not extract package's data directory. Are you sure that your installed application is debuggable?
libgame.so in MyGame.apk dose not contain symbols! how can i force eclipse to make a Debug APK from Build_native.sh output?
in other hand, when i use:
arm-linux-androideabi-addr2line -C -f -s -e libgame.so
to find error info, sometime it work and sometime it return 0?0, it seems the address is not in libgame.so, but logcat say it is in libgame.so
now, how can i find what is the problem?