宕机调试

1、Linux下的段错误(Segmentation-fault)产生的原因及调试方法(经典)

Linux下的段错误(Segmentation-fault)产生的原因及调试方法(经典).zip

 

2、addr2line通过elf调试文件追踪宕机代码

eg: intel curie死机故障定位

BOOT


Quark SE ID 16 Rev 0 A0
ARC Core state: 00004000
    11121|QRK|QKSE| INFO| USB INIT
    11171|QRK| USB| INFO| USB plugged
    11237|QRK|MAIN| INFO| BSP init done
    11238|QRK| CFW| INFO| BLE service init in progress...
    11239|QRK| CFW| INFO| GPIO service init in progress...
    11243|QRK|CHGR| INFO| Charging state: DISCHARGE
    11243|QRK| DRV| INFO| charger_config function not implemented
    11243|QRK| CFW| INFO| battery service init in progress...
    11247|QRK| CFW| INFO| circular_storage service init in progress...
    11247|QRK| CFW| INFO| ll_storage service init in progress...
    11258|QRK| CFW| INFO| properties service init in progress...
    11258|QRK|MAIN| INFO| CFW init done
    11258|QRK|  IQ| INFO| all iq initialization completed
    11259|QRK| BLE| INFO| setting up MIS 's LL_STORAGE_SERVICE.
    11259|QRK|MAIN| INFO| SENSING service init in progress...
    12772|QRK|CHGR| INFO| Charging state: FAULT
    12780|QRK| BLE| INFO| ble_enable: state 1
    12786|QRK| BLE| INFO| Registering GAP
    12787|QRK| BLE| INFO| Registering DIS
    12790|QRK| BLE| INFO| Registering BAS
    12791|QRK| BLE| INFO| Registering SHOES
    12791|QRK| BLE| INFO| Registering MIS
    12794|QRK| BLE| INFO| Registering ISPP
    12794|QRK| BLE| INFO| ble_enable_rsp: addr/type: 84:68:3e:00:7a:96/0
    12801|QRK|[W] | INFO| data check error
    12801|QRK|[D] | INFO| mible_init -- done
    12817|QRK|MAIN| INFO| Device not bonded
    12817|QRK|MAIN| INFO| advertise_start: reason:0x0
    11232|ARC|MAIN| INFO| BSP init done
    11238|ARC| CFW| INFO| ADC service init in progress...
    11238|ARC| CFW| INFO| GPIO service init in progress...
    11238|ARC| CFW| INFO| GPIO service init in progress...
    11366|ARC| CFW| INFO| SS service init in progress...
    11366|ARC|MAIN| INFO| CFW init done

PANIC for 0 (dump located on 0xa800e000)
QRK BUILD CKSUM: 337e35cf
QRK BUILD VERSION: 00000001
QRK PANIC (2, 0x00000000) - EIP=0x4002be78 - ESP=0xa800b9a0

Registers:

cr2:   00000000
edi:   00000000
esi:   00000000
ebx:   000005eb
ebp:   a800b9a0
edx:   00004e9a
ecx:   ffffffff
eax:   000005eb
error: 00000000
cs:    40020008
flags: 00000206
ss:    00000010

Stack:

0xa800b9a0: a800b9ac 4002acd8 4002acdc a800b9b8
0xa800b9b0: 4002a885 00000000 00000202 00000000
0xa800b9c0: 00000000 00000200 a800bd74 00000000
0xa800b9d0: add3ca5b 7f274dbb 8ebcbffc f9fcebcf
0xa800b9e0: 1b25046e 08450000 e4027308 a21c50ad
0xa800b9f0: 320e0ce7 50864610 4d14c444 82498c81
0xa800ba00: d1f55f4b bdeef79e fc7bba74 3337cf6f
0xa800ba10: 67f7cfbf edc872c6 d0cbffd0 3f9ff7a9
0xa800ba20: 090d2000 285b4159 a5a0c210 1b84a48b
0xa800ba30: 09513ac5 823a5d70 501c9500 a0842082

PANIC for 1 (dump located on 0xa8014000)
ARC BUILD CKSUM: 2002c655
ARC BUILD VERSION: 00000001
ARC PANIC - eret=0x40045cac - sp=0x80001438

Registers:

 r0:00000001  r1:00000015  r2:00000000  r3:00000000
 r4:a8010964  r5:00000000  r6:00000332  r7:a8010028
 r8:00000332  r9:fffffc01 r10:0000000c r11:00000009
r12:b0800a10 r13:ffffffff r14:00000000 r15:7fffffff
r16:0000003f r17:a800f208 r18:a8010148 r19:fffffffe
r20:00000000 r21:400414f2 r22:00000001 r23:a8010f14
r24:a801027c r25:a800eac8  gp:4003b932 fp:a800eac8
 sp:80001438  il:40045cac r30:00000000  bl:400350c4

Status registers:

      ecr:00000000
      efa:00000000
     eret:40045cac
 erstatus:00000000

Stack:

0x80001438: 40040930 ffffffff ffffffff 4003464e
0x80001448: 400460f2 40046124 71140050 8342c25c
0x80001458: 2c1d1da8 10c76340 df21f79d f8dfff73
0x80001468: 5fcde8ec bf7f3f7f 019a99a2 4405201a
0x80001478: d09300a1 33081909 cf97e7fd ff5f5d6d
0x80001488: 33e5f6f7 ffcff330 92908701 75250830
0x80001498: 09525360 d4201590 e61d125b 76fbfe76
0x800014a8: fb6d95bd fef73ef3 000025b2 1cf849c5
0x800014b8: 22152470 e4008021 e4ceffa1 93f15a59
0x800014c8: ee46dced b7d6fbff 20040625 95d26842

 

curie@ubuntu:~/b/device/out$ ../wearable_device_sw/external/toolchain/tools/compiler/gcc-ia/5.2.1/bin/i586-intel-elfiamcu-addr2line -e firmware/quark.elf -a 40040930

 

posted @ 2017-02-21 08:49  dong1  阅读(1142)  评论(0编辑  收藏  举报