strace工具移植到ARM(davinci)平台
2009-10-10 15:19
447 查看
strace工具是一个非常强大的工具,是调试程序的好工具。要移植到arm平台,就需要使用交叉编译工具编译生成静态链接的可执行文件。具体步骤如下:
1.下载 strace-4.5.16.tar.bz2,不要下载最新的strace-4.5.18.tar.bz2,因为后者编译会出错。下载网址是:http://sourceforge.net/project/showfiles.php?group_id=2861&package_id=2819;
2.解压。对于ARM平台,必须打上一个补丁,补丁在文章的最后面;
3.配置。./configure --host=arm-linux CC=arm_v5t_le-gcc LD=arm_v5t_le-ld;
4.编译。make CFLAGS+="-static",生成strace静态可执行文件,2M多;
5.strip。arm_v5t_le-stip strace,这样可执行文件就减小到600多K。
以上采用的是达芬奇平台的arm工具,也可以直接使用通用的arm-linux-gcc工具,版本3.4.1的我试过,可以编译通过,其他版本的不清楚。
strace的使用介绍可以参考以下两篇文章:
1.http://www.ibm.com/developerworks/cn/aix/library/au-unix-strace.html。
2.http://blog.chinaunix.net/u1/38279/showart_367248.html
转载请注明原文出处:http://zhiqiang0071.cublog.cn
1.下载 strace-4.5.16.tar.bz2,不要下载最新的strace-4.5.18.tar.bz2,因为后者编译会出错。下载网址是:http://sourceforge.net/project/showfiles.php?group_id=2861&package_id=2819;
2.解压。对于ARM平台,必须打上一个补丁,补丁在文章的最后面;
3.配置。./configure --host=arm-linux CC=arm_v5t_le-gcc LD=arm_v5t_le-ld;
4.编译。make CFLAGS+="-static",生成strace静态可执行文件,2M多;
5.strip。arm_v5t_le-stip strace,这样可执行文件就减小到600多K。
以上采用的是达芬奇平台的arm工具,也可以直接使用通用的arm-linux-gcc工具,版本3.4.1的我试过,可以编译通过,其他版本的不清楚。
strace的使用介绍可以参考以下两篇文章:
1.http://www.ibm.com/developerworks/cn/aix/library/au-unix-strace.html。
2.http://blog.chinaunix.net/u1/38279/showart_367248.html
--- strace-4.5.16-orig/syscall.c 2005-06-08 21:45:28.000000000 +0100 +++ strace-4.5.16/syscall.c 2005-10-25 19:26:39.000000000 +0100 @@ -1045,6 +1045,15 @@ struct tcb *tcp; /* * Note: we only deal with only 32-bit CPUs here. */ + + if (!(tcp->flags & TCB_INSYSCALL) && + (tcp->flags & TCB_WAITEXECVE)) { + /* caught a fake syscall from the execve's exit */ + tcp->flags &= ~TCB_WAITEXECVE; + return 0; + } + + if (regs.ARM_cpsr & 0x20) { /* * Get the Thumb-mode system call number |
转载请注明原文出处:http://zhiqiang0071.cublog.cn
相关文章推荐
- 移植strace调试工具到arm平台
- 移植strace调试工具到arm平台
- ARM平台移植strace-4.11
- arm平台linux移植ethtool工具
- 交叉编译strace工具到arm 平台at91sam9260 和hisi3512
- LOG4C移植到ARM平台流程
- 成功移植NET-SNMP到ARM平台(转)
- ARM平台移植 openssl-1.1.0
- qt-4.8.4在ARM平台上的移植
- Qt5.3.2在ARM-Linux平台的移植
- ortp库移植到arm平台进行文件传输测试
- 移植QT到arm平台
- Mplayer播放器的在PC、arm平台上的移植
- OPENCV在ARM平台的移植
- ARM平台上蓝牙协议栈Bluez的移植使用和配置
- 基于qt的嵌入式平台输入法:SYSZUXpinyin移植到arm后,UDP接收端中文乱码 本地中文乱码 解决
- 移植mysql到arm平台
- 移植mysql到arm平台
- strace 调试工具移植
- 移植MySQL到嵌入式ARM平台