分析tombstone文件

    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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值