Line 10248: 01-01 08:00:45.163 F/DEBUG ( 2531): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Line 10249: 01-01 08:00:45.163 F/DEBUG ( 2531): Build fingerprint: 'xltt/msm8909go/msm8909go:8.1.0/OPM1.171019.011/xltt12141130:userdebug/test-keys'
Line 10250: 01-01 08:00:45.163 F/DEBUG ( 2531): Revision: '0'
Line 10251: 01-01 08:00:45.164 F/DEBUG ( 2531): ABI: 'arm'
Line 10252: 01-01 08:00:45.164 F/DEBUG ( 2531): pid: 492, tid: 2321, name: gps_hardware_cb >>> /vendor/bin/hw/android.hardware.gnss@1.0-service-qti <<<
Line 10253: 01-01 08:00:45.164 F/DEBUG ( 2531): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x43400000
Line 10254: 01-01 08:00:45.164 F/DEBUG ( 2531): r0 b5ce04e0 r1 43400000 r2 2541c8cc r3 00000008
Line 10255: 01-01 08:00:45.164 F/DEBUG ( 2531): r4 41800000 r5 b5ce0438 r6 428a0000 r7 00000000
Line 10256: 01-01 08:00:45.164 F/DEBUG ( 2531): r8 b5ce80b8 r9 000000b2 sl 000000c0 fp b5ce0840
Line 10257: 01-01 08:00:45.164 F/DEBUG ( 2531): ip b5cdfdb0 sp b5ce0288 lr b5ce3ea5 pc 43400000 cpsr 60010010
Line 10349: 01-01 08:00:45.195 F/DEBUG ( 2531):
Line 10350: 01-01 08:00:45.195 F/DEBUG ( 2531): backtrace:
Line 10353: 01-01 08:00:45.195 F/DEBUG ( 2531): #00 pc 43400000 <unknown>
Line 10356: 01-01 08:00:45.195 F/DEBUG ( 2531): #01 pc 00002ea3 /system/lib/hw/bd_gps.default.so (gps_state_thread+3818)
Line 10364: 01-01 08:00:45.195 F/DEBUG ( 2531): #02 pc 0000fa8f /vendor/lib/hw/android.hardware.gnss@1.0-impl-qti.so (threadFunc(void*)+6)
Line 10367: 01-01 08:00:45.195 F/DEBUG ( 2531): #03 pc 00048043 /system/lib/libc.so (__pthread_start(void*)+22)
Line 10370: 01-01 08:00:45.195 F/DEBUG ( 2531): #04 pc 0001b3a7 /system/lib/libc.so (__start_thread+32)
通过 tombstone 的日志文件我们就可以大致定位出引发 crash 的代码的位置,addr2line工具 安卓自带的。
addr2line 是 用来获得指定动态链接库文件或者可执行文件中指定地址对应的源代码信息的工具
它的各种参数如下所示:
Usage: ./prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-addr2line [option(s)] [addr(s)]
Convert addresses into line number/file name pairs.
If no addresses are specified on the command line, they will be read from stdin
The options are:
@<file> Read options from <file>
-a --addresses Show addresses
-b --target=<bfdname> Set the binary file format
-e --exe=<executable> Set the input file name (default is a.out)
-i --inlines Unwind inlined functions
-j --section=<name> Read section-relative offsets instead of addresses
-p --pretty-print Make the output easier to read for humans
-s --basenames Strip directory names
-f --functions Show function names
-C --demangle[=style] Demangle function names
-h --help Display this information
-v --version Display the program's version
/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-addr2line -f -e out/target/product/msm8909go/symbols/system/lib/hw/bd_gps.default.so 00002ea3