如何定位Linux系统中产生的异常,这里需要用到编译链的两个工具:arm-eabi-nm和arm-eabi-addr2line
位置:
一般这两个工具可以在你安装的编译链目录中找到
在我的系统中,位于:prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/下
功能:
arm-eabi-nm:check the function name that are exported in a library
使用方法: ./prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-nm -D out/target/product/[project dir]/system/lib/libandroid_runtime.so | grep _ZN7android31
arm-eabi-addr2line:check the PC point to the library, and return the line number.
使用方法:arm-eabi-addr2line -e libstagefright.so 0x0005f79c