Stack trace analysis NDK application...

Put problems with the Android NDK in this forum.

Stack trace analysis NDK application...

Postby Ramana » Mon Oct 18, 2010 4:59 am

Hi all....i am trying to analyze the stack trace for the crash occured in my ndk application..iam attaching the logcat for the same ....as the size of the asm file is 63mb i am just pasting some part of the file...can somebody help me in tracing out where exactly the crash is happening..

Disassembly of section .plt:

0013e310 <.plt>:
13e310: e52de004 push {lr} ; (str lr, [sp, #-4]!)
13e314: e59fe004 ldr lr, [pc, #4] ; 13e320 <_stack+0xbe320>
13e318: e08fe00e add lr, pc, lr
13e31c: e5bef008 ldr pc, [lr, #8]!
13e320: 003f27d8 .word 0x003f27d8
13e324: e28fc603 add ip, pc, #3145728 ; 0x300000
13e328: e28ccaf2 add ip, ip, #991232 ; 0xf2000
13e32c: e5bcf7d8 ldr pc, [ip, #2008]!
13e330: e28fc603 add ip, pc, #3145728 ; 0x300000
13e334: e28ccaf2 add ip, ip, #991232 ; 0xf2000
13e338: e5bcf7d0 ldr pc, [ip, #2000]!
..
..
..
19dab4: 2400 movs r4, #0
19dab6: e773 b.n 19d9a0 <_ZN7HCHunOp19EventCreatePolyTypeEP3CDCR7HCMouse+0x5d0>
19dab8: 4666 mov r6, ip
19daba: 0736 lsls r6, r6, #28
19dabc: d400 bmi.n 19dac0 <_ZN7HCHunOp19EventCreatePolyTypeEP3CDCR7HCMouse+0x6f0>
19dabe: e608 b.n 19d6d2 <_ZN7HCHunOp19EventCreatePolyTypeEP3CDCR7HCMouse+0x302>
19dac0: e5fa b.n 19d6b8 <_ZN7HCHunOp19EventCreatePolyTypeEP3CDCR7HCMouse+0x2e8>
19dac2: 4299 cmp r1, r3
19dac4: dd5f ble.n 19db86 <_ZN7HCHunOp19EventCreatePolyTypeEP3CDCR7HCMouse+0x7b6>
19dac6: 9a03 ldr r2, [sp, #12]
19dac8: 9e0b ldr r6, [sp, #44]
19daca: 42b2 cmp r2, r6
19dacc: dd69 ble.n 19dba2 <_ZN7HCHunOp19EventCreatePolyTypeEP3CDCR7HCMouse+0x7d2>
19dace: 1ad3 subs r3, r2, r3
19dad0: 602b str r3, [r5, #0]
19dad2: e5de b.n 19d692 <_ZN7HCHunOp19EventCreatePolyTypeEP3CDCR7HCMouse+0x2c2>
19dad4: 6b22 ldr r2, [r4, #48]
19dad6: 4b39 ldr r3, [pc, #228] (19dbbc <_ZN7HCHunOp19EventCreatePolyTypeEP3CDCR7HCMouse+0x7ec>)
19dad8: 429a cmp r2, r3
19dada: d100 bne.n 19dade <_ZN7HCHunOp19EventCreatePolyTypeEP3CDCR7HCMouse+0x70e>
19dadc: e70b b.n 19d8f6 <_ZN7HCHunOp19EventCreatePolyTypeEP3CDCR7HCMouse+0x526>
19dade: 4640 mov r0, r8
19dae0: 6803 ldr r3, [r0, #0]
19dae2: 682a ldr r2, [r5, #0]
19dae4: 1a9a subs r2, r3, r2
19dae6: 17d1 asrs r1, r2, #31
19dae8: 1852 adds r2, r2, r1
19daea: 404a eors r2, r1
19daec: 464b mov r3, r9..
..
Thanks
Ramana.
Attachments
text.txt
logcat output
(58 KiB) Downloaded 78 times
Ramana
Junior Developer
Junior Developer
 
Posts: 17
Joined: Wed May 19, 2010 6:57 am

Top

Re: Stack trace analysis NDK application...

Postby ratamovic » Tue Dec 07, 2010 2:24 pm

There is a tool for that: arm-eabi-addr2line.
Here is a link (I should say "advertise" :)) to a post which explains how to use it: http://www.codexperiments.com/android/2010/08/tips-tricks-debugging-android-ndk-stack-traces/

Hope that helps
http://www.codexperiments.com/
Because IT is an experimental science
ratamovic
Freshman
Freshman
 
Posts: 6
Joined: Fri Jan 23, 2009 3:20 am

Re: Stack trace analysis NDK application...

Postby Ramana » Mon Dec 20, 2010 4:57 am

Thanks ratamovic....:)
Ramana
Junior Developer
Junior Developer
 
Posts: 17
Joined: Wed May 19, 2010 6:57 am

Re: Stack trace analysis NDK application...

Postby aashishvijayvirgiya » Wed Jun 01, 2011 10:26 am

new to android.
working on android jni(ndk).done some sample projects based on prebuilt library, having same problems
my androi.mk is

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE :=hello-jni
LOCAL_SRC_FILE:=hello-jni.c
LOCAL_SHARED_LIBRARY := ndk
include $(BUILD_SHARED_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE := ndk
NDK_MODULE_PATH := $(LOCAL_PATH)
LOCAL_SRC_FILES := libndk.so
include $(PREBUILT_SHARED_LIBRARY)

hello-jni.c calls functions from libndk.so(ARM lib.)

this project run successfully several times but when i restarted the eclipse and again run the project from eclipse.
emulator load the project. but having the problem calling funtions from shared library. it stopped unexpectedly. when i debug in logcat view it show unsatisfied linker error.
please help me out this problem.
attached the project also

my email address is ashish_vijayvirgiya@yahoo.com
if you want some additional information then you tell me.

thanks.
aashishvijayvirgiya
Freshman
Freshman
 
Posts: 8
Joined: Tue May 31, 2011 8:30 am

Top

Return to NDK Problems

Who is online

Users browsing this forum: No registered users and 2 guests