开发者

how to see more infomation in ndk-gdb when the program breakdown

I use eclipse and ndk-gdb to debug my AndroidNDK program,but i find a problem,the ndk-gdb tools seems do not have the function of "saving the stack" when the program breakdown,i cannot find detail infomation from the ndk-gdb,it does not point which function,which class and开发者_Go百科 which line,just give the info like this:*Program received signal SIGSEGV, Segmentation fault.0xafd0cda4 in memcpy () from D:/android/ndk/samples/mango_d/obj/local/armeabi/libc.so*

so , i was wondering if there is a way to see more infomation(the last sentence the program called or others) when the program breakdown,thank you fist


You could try utilize the ndk-stack program, consult to the doc in the ndk, docs/NDK-STACK.html

If you compile the c source by

ndk-build NDK_DEBUG=1 APP_OPTIM=debug

you should be able to call something similar like this one

adb -s %TARGET_INSTALL% logcat DEBUG:I | ndk-stack -sym ./obj/local/armeabi-v7a

that one will give you the source code and line stack trace for the seg-fault.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜