A20 程序崩溃的调试

1、首先找到log信息中 backtrace:标识符

在标识符下方有崩溃所在的文件的名字和地址如:

 backtrace:
01-02 08:33:05.050: I/DEBUG(1258):     #00  pc 00016d94  /system/lib/libc.so (write+12)
01-02 08:33:05.050: I/DEBUG(1258):     #01  pc 00001761  /cimovservicefind ./ -name "cimovservice"

搜索文件名字,在$OUT/obj目录下,如:

find ./ -name "cimovservice"
./out/target/product/sugar-evb/system/bin/cimovservice
./out/target/product/sugar-evb/symbols/system/bin/cimovservice
./out/target/product/sugar-evb/obj/EXECUTABLES/cimovservice_intermediates/LINKED/cimovservice
./out/target/product/sugar-evb/obj/EXECUTABLES/cimovservice_intermediates/cimovservice
./frameworks/mysys/cimovservice

然后到obi/EXECUTABLES/cimovservice_intermediates/LINKED/目录下执行

arm-eabi-addr2line 00001761(上方backtrace标识符下cimovservice的地址) -e cimovservice

就可以找到程序崩溃的地方了



你可能感兴趣的:(android)