android出现段错误时的查找定位的方法

android出现段错误时的查找方法,例如出现log:

 - ::01.090 F/libc    ( ): Fatal signal  (SIGSEGV) at 0x00000000 (code=), thread  (SurfaceFlinger)
- ::01.210 I/DEBUG ( ): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
- ::01.210 I/DEBUG ( ): Build fingerprint: 'Android/4.2/bld.pad-706.b77.tl7689.nusmartQA-user/eng..20140613.152301/dev-keys'
- ::01.220 I/DEBUG ( ): Revision: ''
- ::01.220 I/DEBUG ( ): pid: , tid: , name: SurfaceFlinger >>> /system/bin/surfaceflinger <<<
- ::01.220 I/DEBUG ( ): signal (SIGSEGV), code (SEGV_MAPERR), fault addr
- ::01.250 I/DEBUG ( ): r0 40c223c0 r1 r2 411f8d88 r3 40c223c0
- ::01.250 I/DEBUG ( ): r4 411f8d40 r5 411f8c88 r6 411f8d50 r7
- ::01.250 I/DEBUG ( ): r8 40c1be18 r9 4098ddd8 sl fp 40c1be20
- ::01.260 I/DEBUG ( ): ip ffffffff sp 4098ddb8 lr pc 405a9bd8 cpsr 200f0010
- ::01.260 I/DEBUG ( ): d0 d1
- ::01.260 I/DEBUG ( ): d2 d3
- ::01.260 I/DEBUG ( ): d4 74666f7320797261 d5 79616d2065726177
- ::01.260 I/DEBUG ( ): d6 d7 736120796c6e6f20
- ::01.260 I/DEBUG ( ): d8 d9
- ::01.260 I/DEBUG ( ): d10 d11
- ::01.260 I/DEBUG ( ): d12 d13
- ::01.260 I/DEBUG ( ): d14 d15
- ::01.260 I/DEBUG ( ): d16 01830b3b09000003 d17
- ::01.260 I/DEBUG ( ): d18 419e264d78000000 d19
- ::01.260 I/DEBUG ( ): d20 d21
- ::01.260 I/DEBUG ( ): d22 d23
- ::01.260 I/DEBUG ( ): d24 d25
- ::01.260 I/DEBUG ( ): d26 d27
- ::01.260 I/DEBUG ( ): d28 d29
- ::01.260 I/DEBUG ( ): d30 d31
- ::01.260 I/DEBUG ( ): scr
- ::01.260 I/DEBUG ( ):
- ::01.260 I/DEBUG ( ): backtrace:
- ::01.260 I/DEBUG ( ): # pc 00071bd8 /system/lib/libMali.so
- ::01.260 I/DEBUG ( ): # pc /system/lib/libMali.so (mali_common_ds_consumer_release_ref_count_change+)
- ::01.260 I/DEBUG ( ): # pc 0007140c /system/lib/libMali.so
- ::01.260 I/DEBUG ( ): # pc 0007af28 /system/lib/libMali.so
- ::01.260 I/DEBUG ( ): # pc 0000e194 /system/lib/libc.so (__thread_entry+)
- ::01.260 I/DEBUG ( ): # pc 0000dc9c /system/lib/libc.so (pthread_create+)
- ::01.260 I/DEBUG ( ):
- ::01.260 I/DEBUG ( ): stack:
- ::01.260 I/DEBUG ( ): 4098dd78 411df348 [heap]
- ::01.270 I/DEBUG ( ): 4098dd7c 405b187c /system/lib/libMali.so
- ::01.270 I/DEBUG ( ): 4098dd80
- ::01.270 I/DEBUG ( ): 4098dd84 411df298 [heap]

需要查看哪出的问题,需要用一个工具来定位,如下方法:

arm-linux-androideabi-addr2line -e out/target/product/nusmart7_pad/symbols/system/lib/libMali.so 

完。

上一篇:SQL Server中的高可用性(3)----复制


下一篇:Spring MVC 程序首页的设置 - 一号门-程序员的工作,程序员的生活(java,python,delphi实战)