very cool stuff. testing on Blackfin shows much better behavior than current vanilla strace.
this simple test script: #!/bin/sh true false cat /etc/inittab > /dev/null exit 0 run like so: strace -f sh /test.sh i'm not sure if this is a Blackfin thing, but the first arg to execve() isnt decoded correctly. also, the forked programs hit the PANIC code instead of decoding the exit ? for example, the above strace shows: ... read(3, "#!/bin/sh\ntrue\nfalse\ncat /etc/in"..., 256) = 57 vfork(Process 228 attached <unfinished ...> [pid 228] mmap2(NULL, 4095, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0x27f6000 [pid 228] execve("/bin/trh", ["true"], [/* 4 vars */] <unfinished ...> [pid 227] <... vfork resumed> ) = 228 [pid 227] wait4(-1, Process 227 suspended <unfinished ...> [pid 228] <... execve resumed> ) = 0 [pid 228] execve(NULL, [0x2a0e520], [/* 0 vars */]) = 0 [pid 228] mmap2(0x206d000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS|0x4000000, -1, 0) = 0x2c84600 [pid 228] stat(NULL, {st_mode=S_IFREG|0644, st_size=959, ...}) = 46679552 [pid 228] open(0x3, O_RDONLY) = 0 [pid 228] mmap2(0x27e0000, 959, PROT_READ, MAP_PRIVATE, 3, 0) = 0x3 [pid 228] close(0) = 41812877 [pid 228] open(0x3, O_RDONLY) = 3 [pid 228] fstat(0, {st_mode=S_IFREG|0755, st_size=229660, ...}) = 0 [pid 228] mmap2(0x27e1000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS|0x4000000, -1, 0) = 0x3 [pid 228] read(4096, "", 4096) = 0 [pid 228] mmap2(0x2cc0000, 221828, PROT_READ|PROT_EXEC, MAP_PRIVATE| MAP_DENYWRITE|MAP_EXECUTABLE, 3, 0) = 0 [pid 228] mmap2(0x2a50000, 15544, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x3 [pid 228] pread(7028, "ECT", 7028, 949978046398464) = 3 [pid 228] close(0) = 41816064 [pid 228] munmap(0, 4096) = 41811968 [pid 228] munmap(0, 959) = 34001760 [pid 228] stat(NULL, {st_mode=S_IFREG|0755, st_size=20260, ...}) = 0 [pid 228] ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B57600 opost isig icanon echo ...}) = 1 [pid 228] ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B57600 opost isig icanon echo ...}) = 46923685 [pid 228] getuid32() = 0 PANIC: attached pid 228 exited with 0 Process 227 resumed <... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WSTOPPED, NULL) = 228 --- SIGCHLD (Child exited) @ 0 (0) --- rt_sigtimedwait([QUIT], NULL, {0, 0}, 8) = -1 EAGAIN (Resource temporarily unavailable) wait4(-1, 0x2b3fc94, WNOHANG|WSTOPPED, NULL) = -1 ECHILD (No child processes) ... everything here looks fine except for the first execve() and that PANIC: ... the second execve() where it shows NULL i think is a Blackfin thing as it is trying to decode the args at the exit point of execve() ... -mike
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev