Ndk debug cocos2d-x 2.0-2.0.4


#1

Hello everyone!
I’m trying to debug my game project on android platform. So, first of all i try to debug helloworld project.
I use this instruction http://tools.android.com/recent/usingthendkplugin. And i integrate build_native.sh and ndkgdb.sh logic to build and run configs of ADT (Eclipse) and jni/Androin.mk.
Project starts fine without any problems on my galaxy with 2.3.4 and asus tablet with 4.0.1. But when i’m trying to debug Debugger hit only on java code breakpoints. And andoid output:

[2012-12-02 15:41:50 - testHello] Error while obtaining file from device
[2012-12-02 15:41:50 - testHello] com.android.ddmlib.SyncException: Writing local file failed!

Searching in internet without result. One devise is rooted (i think debugger haven’t permission to write on device, but i don’t know how use root access).

I use last sdk(trying with later versions), and ndk-8, last ADT with CDT 8.02. MacOs 10.7.8

this is my build output with ndk logging on

**** Build of configuration Default for project testHello ****
/Users/mac/android-ndk/ndk-build NDK_LOG=1 NDK_DEBUG=1 all 
HOST_OS=darwin
HOST_ARCH=x86_64
HOST_TAG=darwin-x86 (no 64-bit prebuilt binaries detected)
GNUMAKE=/Users/mac/android-ndk/prebuilt/darwin-x86/bin/make (NDK prebuilt)
Android NDK: NDK installation path auto-detected: '/Users/mac/android-ndk'
Android NDK: GNU Make version 3.81 detected
Android NDK: Host OS was auto-detected: darwin
Android NDK:  Host operating system detected: darwin
Android NDK: Host CPU was auto-detected: x86
Android NDK: HOST_TAG set to darwin-x86
Android NDK: Host tools prebuilt directory: /Users/mac/android-ndk/prebuilt/darwin-x86/bin
Android NDK: Host 'echo' tool: echo
Android NDK: Host 'echo -n' tool: printf %s
Android NDK: Host 'cmp' tool: cmp
Android NDK: Host 'awk' tool: /Users/mac/android-ndk/prebuilt/darwin-x86/bin/awk
Android NDK: Host 'awk' test returned: Pass
Android NDK:  This NDK supports the following target architectures and ABIS:
Android NDK:    arm: armeabi armeabi-v7a
Android NDK:    mips: mips
Android NDK:    x86: x86
Android NDK:  This NDK supports the following toolchains and target ABIs:
Android NDK:    arm-linux-androideabi-4.4.3:  armeabi armeabi-v7a
Android NDK:    arm-linux-androideabi-4.6:  armeabi armeabi-v7a
Android NDK:    arm-linux-androideabi-clang3.1:  armeabi armeabi-v7a
Android NDK:    mipsel-linux-android-4.4.3:  mips
Android NDK:    mipsel-linux-android-4.6:  mips
Android NDK:    mipsel-linux-android-clang3.1:  mips
Android NDK:    x86-4.4.3:  x86
Android NDK:    x86-4.6:  x86
Android NDK:    x86-clang3.1:  x86
Android NDK: Found platform root directory: /Users/mac/android-ndk/platforms
Android NDK: Found supported platforms: android-14 android-3 android-4 android-5 android-8 android-9
Android NDK: PLATFORM android-14 supports: arm mips x86
Android NDK:   ABI arm sysroot is: /Users/mac/android-ndk/platforms/android-14/arch-arm
Android NDK:   ABI mips sysroot is: /Users/mac/android-ndk/platforms/android-14/arch-mips
Android NDK:   ABI x86 sysroot is: /Users/mac/android-ndk/platforms/android-14/arch-x86
Android NDK: PLATFORM android-3 supports: arm
Android NDK:   ABI arm sysroot is: /Users/mac/android-ndk/platforms/android-3/arch-arm
Android NDK: PLATFORM android-4 supports: arm
Android NDK:   ABI arm sysroot is: /Users/mac/android-ndk/platforms/android-4/arch-arm
Android NDK: PLATFORM android-5 supports: arm
Android NDK:   ABI arm sysroot is: /Users/mac/android-ndk/platforms/android-5/arch-arm
Android NDK: PLATFORM android-8 supports: arm
Android NDK:   ABI arm sysroot is: /Users/mac/android-ndk/platforms/android-8/arch-arm
Android NDK: PLATFORM android-9 supports: arm mips x86
Android NDK:   ABI arm sysroot is: /Users/mac/android-ndk/platforms/android-9/arch-arm
Android NDK:   ABI mips sysroot is: /Users/mac/android-ndk/platforms/android-9/arch-mips
Android NDK:   ABI x86 sysroot is: /Users/mac/android-ndk/platforms/android-9/arch-x86
Android NDK: Found stable platform levels: 14 3 4 5 8 9
Android NDK: Found max platform level: 14
Android NDK: Found project path: .
Android NDK: Ouput path: ./obj
Android NDK: Parsing ./jni/Application.mk
Android NDK:   Found APP_PLATFORM=android-8 in ./project.properties
Android NDK:   APP_PIE is 
Android NDK:   Defaulted to APP_BUILD_SCRIPT=./jni/Android.mk
Android NDK: Application 'local' forced debuggable through NDK_DEBUG
Android NDK: Selecting debug optimization mode (app is debuggable)
Android NDK: Adding import directory: /Users/mac/android-ndk/sources
Android NDK: Building application 'local' for ABI 'armeabi'
Android NDK: Using target toolchain 'arm-linux-androideabi-4.6' for 'armeabi' ABI
Android NDK: Looking for imported module with tag 'cxx-stl/gnu-libstdc++'
Android NDK:   Probing /Users/mac/android-ndk/sources/cxx-stl/gnu-libstdc++/Android.mk
Android NDK:     Found in /Users/mac/android-ndk/sources/cxx-stl/gnu-libstdc++
Android NDK: Adding import directory: ~/cocos2d
Android NDK: Adding import directory: ~/cocos2d/cocos2dx/platform/third_party/android/prebuilt
Android NDK: Looking for imported module with tag 'CocosDenshion/android'
Android NDK:   Probing /Users/mac/android-ndk/sources/CocosDenshion/android/Android.mk
Android NDK:   Probing ~/cocos2d/CocosDenshion/android/Android.mk
Android NDK:     Found in ~/cocos2d/CocosDenshion/android
Android NDK: Looking for imported module with tag 'cocos2dx'
Android NDK:   Probing /Users/mac/android-ndk/sources/cocos2dx/Android.mk
Android NDK:   Probing ~/cocos2d/cocos2dx/Android.mk
Android NDK:     Found in ~/cocos2d/cocos2dx
Android NDK: Looking for imported module with tag 'libjpeg'
Android NDK:   Probing /Users/mac/android-ndk/sources/libjpeg/Android.mk
Android NDK:   Probing ~/cocos2d/libjpeg/Android.mk
Android NDK:   Probing ~/cocos2d/cocos2dx/platform/third_party/android/prebuilt/libjpeg/Android.mk
Android NDK:     Found in ~/cocos2d/cocos2dx/platform/third_party/android/prebuilt/libjpeg
Android NDK: Looking for imported module with tag 'libpng'
Android NDK:   Probing /Users/mac/android-ndk/sources/libpng/Android.mk
Android NDK:   Probing ~/cocos2d/libpng/Android.mk
Android NDK:   Probing ~/cocos2d/cocos2dx/platform/third_party/android/prebuilt/libpng/Android.mk
Android NDK:     Found in ~/cocos2d/cocos2dx/platform/third_party/android/prebuilt/libpng
Android NDK: Looking for imported module with tag 'libxml2'
Android NDK:   Probing /Users/mac/android-ndk/sources/libxml2/Android.mk
Android NDK:   Probing ~/cocos2d/libxml2/Android.mk
Android NDK:   Probing ~/cocos2d/cocos2dx/platform/third_party/android/prebuilt/libxml2/Android.mk
Android NDK:     Found in ~/cocos2d/cocos2dx/platform/third_party/android/prebuilt/libxml2
Android NDK: Looking for imported module with tag 'libtiff'
Android NDK:   Probing /Users/mac/android-ndk/sources/libtiff/Android.mk
Android NDK:   Probing ~/cocos2d/libtiff/Android.mk
Android NDK:   Probing ~/cocos2d/cocos2dx/platform/third_party/android/prebuilt/libtiff/Android.mk
Android NDK:     Found in ~/cocos2d/cocos2dx/platform/third_party/android/prebuilt/libtiff
Android NDK: Looking for imported module with tag 'extensions'
Android NDK:   Probing /Users/mac/android-ndk/sources/extensions/Android.mk
Android NDK:   Probing ~/cocos2d/extensions/Android.mk
Android NDK:     Found in ~/cocos2d/extensions
Android NDK: Skipping duplicate import for module with tag 'cocos2dx'
Android NDK: Looking for imported module with tag 'cocos2dx/platform/third_party/android/prebuilt/libcurl'
Android NDK:   Probing /Users/mac/android-ndk/sources/cocos2dx/platform/third_party/android/prebuilt/libcurl/Android.mk
Android NDK:   Probing ~/cocos2d/cocos2dx/platform/third_party/android/prebuilt/libcurl/Android.mk
Android NDK:     Found in ~/cocos2d/cocos2dx/platform/third_party/android/prebuilt/libcurl
Android NDK: Module 'cocos2dx_static' has C++ sources
Android NDK: Module 'cocos_extension_static' has C++ sources
Android NDK: Module 'cocosdenshion_static' has C++ sources
Android NDK: Module 'game_shared' has C++ sources
Gdbserver      : [arm-linux-androideabi-4.6] libs/armeabi/gdbserver
Gdbsetup       : libs/armeabi/gdb.setup
Compile++ thumb  : game_shared <= HelloWorldScene.cpp
Prebuilt       : libgnustl_static.a <= /sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/
Compile++ thumb  : cocos2dx_static <= CCConfiguration.cpp
Compile++ thumb  : cocos2dx_static <= CCDrawingPrimitives.cpp
Compile++ thumb  : cocos2dx_static <= CCScheduler.cpp
Compile++ thumb  : cocos2dx_static <= CCCamera.cpp
Compile++ thumb  : cocos2dx_static <= CCAction.cpp
Compile++ thumb  : cocos2dx_static <= CCActionCamera.cpp

//cocos compile

Prebuilt       : png.a <= /Users/mac/cocos2d/cocos2dx/platform/third_party/android/prebuilt/libpng/libs/armeabi/
Prebuilt       : jpeg.a <= /Users/mac/cocos2d/cocos2dx/platform/third_party/android/prebuilt/libjpeg/libs/armeabi/
Prebuilt       : xml2.a <= /Users/mac/cocos2d/cocos2dx/platform/third_party/android/prebuilt/libxml2/libs/armeabi/
Prebuilt       : tiff.a <= /Users/mac/cocos2d/cocos2dx/platform/third_party/android/prebuilt/libtiff/libs/armeabi/
StaticLibrary  : libcocos2d.a
StaticLibrary  : libcocosdenshion.a

//compile

StaticLibrary  : libextension.a
SharedLibrary  : libgame.so
Install        : libgame.so => libs/armeabi/libgame.so

**** Build Finished ****

When i trying to start debugger ADT hang in this state: http://d.pr/i/p4KN

Debugger config

How to find solution to the problem?