From: Vasya P. <ptu...@gm...> - 2004-11-18 14:43:59
|
Hi All, I'v found issue, that fake_execve() called before trace process (child) ready. It is not important in common use, because fake_execve() just print pretty formatted line (with argc, argv[] and environ). But if we pass "-i" arg to strace, fake_execve() -> printleader() -> if(iflag) ->printcall() try to determine "Instruction Pointer" by calling upeek() -> ptrace(PTRACE_PEEKUSER, ...). And very often (on fast CPU) ptrace() fail in case that trace process (child) not ready for it. $ strace -i cat /dev/null upeek: ptrace(PTRACE_PEEKUSER,13426,48,0): No such process [????????] execve("/bin/cat", ["cat", "/dev/null"], [/* 37 vars */]) = 0 My solution is remove fake_execve() function call and insert kill(getpid(), SIGSTOP) function before execve(TARGET_BIN,....). |