Hello,
I’m trying to debug my application on android emulator but while trying setup a breakpoint I’m getting:
Cannot access memory at address 0x227142
How I’m compiling and starting gdb:
My Application.mk file:
APP_STL := gnustl_static
APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char
APP_LDFLAGS := -latomic
ifeq ($(NDK_DEBUG),1)
APP_CPPFLAGS += -DCOCOS2D_DEBUG=1
APP_OPTIM := debug
else
APP_CPPFLAGS += -DNDEBUG
APP_OPTIM := release
endif
APP_ABI := armeabi armeabi-v7a
NDK_TOOLCHAIN_VERSION := clang
APP_STL:=c++_static
APP_CPPFLAGS += -std=c++1y
NDK_TOOLCHAIN_VERSION=4.9
APP_OPTIM := debug
I’m compiling application with command:
cocos run --target android-10 --ap android-10 --ndk-mode debug --ndk-toolchain arm-linux-androideabi-4.9 --platform android --app-abi armeabi
-
Emulator spec:
-
After starting emulator and starting application on it I’m running:
- ndk-gdb
-
I’ve realised that there were waring:
warning: Could not load shared library symbols for 104 libraries, e.g. libstdc++.so -
I figured out that there were no symbols related to my app and cocos loaded to gdb! → Is it correct?
-
I’ve loaded symbols by:
file ./obj/local/armeabi/libcocos2dcpp.so
After that I’ve found symbols from my App by:
file types Checker
-I’ve tried to setup breakpoint by:
b CheckersTableScene.cpp:599 and it leads to:
Cannot access memory at address 0x227142
What I’m doing wrong?![]()

and looks like debuging works correctly!