android手机在chromium/webview/browser进程出现crash的时候会在系统目录下生成corefiel文件夹,包含了maps和core文件;
corefile文件保存了发生crash时刻系统内存状态,可以通过恢复corefile的内存信息来定位发生crash的原因:
步骤如下:
1.启动gdb工具:
android文件夹下的prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin,执行./arm-eabi-gdb
2.加载corefile及符号表
set solib-search-path /symbols/system/lib/
file symbols/system/bin/app_process32
core-file corefile/core-xxxxx
3.加载代码
directory souce code
4.然后就可以进行调试了
------------------------------------------------------------------------------------
可能遇到的问题:
1. 加载corefile文件提示如下错误:
warning: `/out/target/product/sp9832e_1h10_go/symbols/system/lib/libandroid_runtime.so': Shared library architecture unknown is not compatible with target architecture i386.
warning: `/out/target/product/sp9832e_1h10_go
corefile文件保存了发生crash时刻系统内存状态,可以通过恢复corefile的内存信息来定位发生crash的原因:
步骤如下:
1.启动gdb工具:
android文件夹下的prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin,执行./arm-eabi-gdb
2.加载corefile及符号表
set solib-search-path /symbols/system/lib/
file symbols/system/bin/app_process32
core-file corefile/core-xxxxx
3.加载代码
directory souce code
4.然后就可以进行调试了
------------------------------------------------------------------------------------
可能遇到的问题:
1. 加载corefile文件提示如下错误:
warning: `/out/target/product/sp9832e_1h10_go/symbols/system/lib/libandroid_runtime.so': Shared library architecture unknown is not compatible with target architecture i386.
warning: `/out/target/product/sp9832e_1h10_go