简体   繁体   中英

Android Developer console stack trace

I am getting following kind of stack trace for a live game on play store. - backtrace:

#00 pc 00395838 /data/app-lib/com.mycompany.game-1/libgame.so (cocos2d::CCAnimate::update(float)+432)

and

#00 pc 002d0028 /data/app/com.mycompany.game-1/lib/arm/libgame.so (MyClassName::myFunction(std::string, unsigned int, cocos2d::CCNode*)+984)

So what I need to know is how to find out the line (inside these functions) where the code is actually crashing. Also does these numbers at the end (+432 and +984) have any significance?

I am using cocos2dx 2.0.2 .

Anyway, I found how to do this using ndk-stack from android NDK.

This tool is there in android NDK 7 and above. Pretty easy to use. There are two ways by which this function can be used

Do these in command prompt/terminal

  1. With stack dump in a file:

    $NDK/ndk-stack -sym $PROJECT_PATH/obj/local/armeabi -dump stacktrace.txt

  2. stack trace as direct input from stdin

    adb logcat | $NDK/ndk-stack -sym $PROJECT_PATH/obj/local/armeabi

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM