编译arm平台的strace

ARM 223浏览

strace-4.5.15 用4.3.3版的交叉编译器编译出错,用3.4.5版可以编译,但我的内核,文件系统都是用的4.3.3的

那就试一下最新版strace-4.7

下载源码 http://sourceforge.net/projects/strace/

一开始用的window的ie下载,得到的是strace-4.7.tar.tar,没法解压

然后用linux下的火狐下载才得到strace-4.7.tar.xz

xd -d strace-4.7.tar.xz
tar -xvf strace-4.7.tar
cd strace-4.7

mkdir __install
CC=arm-linux-gcc LD=arm-linux-ld RANLIB=arm-linux-ranlib ./configure --prefix=/media/sf_vbox/strace-4.7/__install --host=arm-linux --target=arm-linux
make
make install
 

[root@fedora10 output]# cp bin/* /mnt/wyh/nfs/rootfs_latesd/bin/
[root@wyh2440 /]# strace ls
execve("/bin/ls", ["ls"], [/* 20 vars */]) = 0
uname({sys="Linux", node="wyh2440", ...}) = 0
brk(0)                                  = 0x1e4000
brk(0x1e4d02)                           = 0x1e4d02
set_tls(0x1e44a0, 0x8, 0, 0x1df4d8, 0x1e44a0) = 0
brk(0x205d02)                           = 0x205d02
brk(0x206000)                           = 0x206000
getpid()                                = 948
getuid32()                              = 0
gettimeofday({136, 627553}, NULL)       = 0
ioctl(0, TIOCGWINSZ, {ws_row=0, ws_col=0, ws_xpixel=0, ws_ypixel=0}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B115200 opost isig icanon echo ...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B115200 opost isig icanon echo ...}) = 0
stat64(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fcntl64(3, F_GETFD)                     = 0x1 (flags FD_CLOEXEC)
getdents64(3, /* 18 entries */, 4096)   = 464
lstat64("./etc", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("./tmp", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("./linuxrc", {st_mode=S_IFLNK|0777, st_size=11, ...}) = 0
lstat64("./dev", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=13200, ...}) = 0
lstat64("./sys", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
lstat64("./root", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("./proc", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
lstat64("./usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("./mnt", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("./driver", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("./readme.txt", {st_mode=S_IFREG|0644, st_size=65, ...}) = 0
lstat64("./lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("./opt", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("./bin", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("./sbin", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getdents64(3, /* 0 entries */, 4096)    = 0
close(3)                                = 0
lstat64("./bin", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fstat64(1, {st_mode=S_IFCHR|0660, st_rdev=makedev(204, 64), ...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B115200 opost isig icanon echo ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40000000
lstat64("./etc", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("./mnt", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("./readme.txt", {st_mode=S_IFREG|0644, st_size=65, ...}) = 0
lstat64("./sys", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
write(1, "33[1;34mbin33[0m         33[1;34met"..., 106bin         etc         mnt         readme.txt  sys
) = 106
lstat64("./dev", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=13200, ...}) = 0
lstat64("./lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("./opt", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("./root", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("./tmp", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
write(1, "33[1;34mdev33[0m         33[1;34mli"..., 107dev         lib         opt         root        tmp
) = 107
lstat64("./driver", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("./linuxrc", {st_mode=S_IFLNK|0777, st_size=11, ...}) = 0
lstat64("./proc", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
lstat64("./sbin", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("./usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
write(1, "33[1;34mdriver33[0m      33[1;36mli"..., 107driver      linuxrc     proc        sbin        usr
) = 107
exit_group(0)                           = ?
+++ exited with 0 +++
[root@wyh2440 /]#