两种方法:
一、android自带的arm-eabi-addr2line工具
例如,
07-04 08:14:55.930 64 64 I DEBUG : #00 pc 0000d766 /system/lib/libtest.so 07-04 08:14:55.930 64 64 I DEBUG : #01 pc 0000e418 /system/lib/libtest.so 07-04 08:14:55.930 64 64 I DEBUG : #02 pc 0001d626 /system/lib/libtest.so 07-04 08:14:55.940 64 64 I DEBUG : #03 pc 00011e34 /system/lib/libdvm.so 07-04 08:14:55.940 64 64 I DEBUG : #04 pc 0004368c /system/lib/libdvm.so 07-04 08:14:55.940 64 64 I DEBUG : #05 pc 00017034 /system/lib/libdvm.so 07-04 08:14:55.940 64 64 I DEBUG : #06 pc 0001c0e4 /system/lib/libdvm.so 07-04 08:14:55.940 64 64 I DEBUG : #07 pc 0001afdc /system/lib/libdvm.so 07-04 08:14:55.940 64 64 I DEBUG : #08 pc 00059c40 /system/lib/libdvm.so 07-04 08:14:55.940 64 64 I DEBUG : #09 pc 00059e54 /system/lib/libdvm.so 07-04 08:14:55.940 64 64 I DEBUG : #10 pc 0004e1aa /system/lib/libdvm.so 07-04 08:14:55.940 64 64 I DEBUG : #11 pc 000118e4 /system/lib/libc.so 07-04 08:14:55.940 64 64 I DEBUG : #12 pc 000114b0 /system/lib/libc.so prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-addr2line -C -f -e out/target/product/generic/symbols/system/lib/libtest.so 0000d766 prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-addr2line -C -f -e out/target/product/generic/symbols/system/lib/libtest.so 0000e418 prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-addr2line -C -f -e out/target/product/generic/symbols/system/lib/libtest.so 0001d626
arm-eabi-addr2line工具可在源码环境和NDK环境中找到,通过此工具可大致获得崩溃在哪个函数,从而快速定位问题
二、使用IDA Pro工具
该工具收费,可找下破解版的