利用Android stuido的安装目录下的minidump_stackwalk.exe解析native导致崩溃生成的dmp文件

1.Android Studiod的安装目录\bin\lldb\bin中存在一个minidump_stackwalk.exe的可执行文件,在该目录下运行cmd,并执行如下命令: minidump_stackwalk.exe f7ab957b-326b-4852-160d079e-1f5563b.dmp >crash.txt

2.从解析出来的crash原因,进行符号解析

   

Operating system: Android
                  0.0.0 Linux 4.9.44_s5 #2 SMP PREEMPT Tue Apr 28 12:33:34 CST 2020 armv8l
CPU: arm
     ARMv1 ARM part(0x4100d0b0) features: half,thumb,fastmult,vfpv2,edsp,neon,vfpv3,tls,vfpv4,idiva,idivt
     4 CPUs

GPU: UNKNOWN

Crash reason:  SIGSEGV
Crash address: 0x0
Process uptime: not available

Thread 0 (crashed)
 0  libavdevice.so + 0xb6472
     r0 = 0xc58b5d00    r1 = 0xffa0a16c    r2 = 0x00010004    r3 = 0xc9dddfec
     r4 = 0xffa0a16c    r5 = 0x0017be26    r6 = 0x00000000    r7 = 0x00000000
     r8 = 0xc58b5d00    r9 = 0xffa0a290   r10 = 0xffa0a248   r12 = 0x00000000
     fp = 0xffa0a324    sp = 0xffa0a160    lr = 0xc9c59cf5    pc = 0xc9c59472
    Found by: given as instruction pointer in context

在Android NDK中提供的addr2line来根据地址进行符号解析,目录为arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin(不同的架构对应不同的目录),执行如下命令,即可符号化解析:

  arm-linux-androideabi-addr2line.exe -f -C -e libavdevice.so 0x7b2

你可能感兴趣的:(利用Android stuido的安装目录下的minidump_stackwalk.exe解析native导致崩溃生成的dmp文件)