android平台移植valgrind

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/linux_embedded/article/details/78021325

Android平台移植Valgrind

开发平台信息

  1. PC: Ubuntu16.04
  2. Android:Firefly Rk3288 Reload + Android 5.1
  3. 交叉编译器:arm-linux-androideabi-gcc 4.6 衍生自android-ndk-r10b(开发工具的生成方式可以参见Android C/C++开发指南)
  4. valgrind版本valgrind-3.13.0

配置选项

     CC="arm-linux-androideabi-gcc" ./configure --prefix=/data/local/Inst \
         --host=armv7-unknown-linux --target=armv7-unknown-linux \
         --with-tmpdir=/sdcard

    注意:--prefix指定的目录需与开发板上valgrind安装目录相同,否则valgrind会因为找不到库文件而无法运行

配置完成后输出信息如下:

       Maximum build arch: arm
       Primary build arch: arm
       Secondary build arch: 
       Build OS: linux
       Primary build target: ARM_LINUX
       Secondary build target: 
       Platform variant: android
       Primary -DVGPV string: -DVGPV_arm_linux_android=1
       Default supp files: exp-sgcheck.supp xfree-3.supp xfree-4.supp  bionic.supp 

出现如上信息说明Android平台的Valgrind配置成功.

编译安装

编译安装的步骤如下:

    make  -j4
    make -j4 install DESTDIR=`pwd`/Inst
    adb push Inst/data/local/ /data/local

至此,Android平台下的valgrind移植完成,后续还会介绍valgrind的具体使用方式.

猜你喜欢

转载自blog.csdn.net/linux_embedded/article/details/78021325