System call tracing in Linuxulator

Dan Nelson dnelson at allantgroup.com
Fri May 20 16:58:41 GMT 2005


In the last episode (May 20), Martin Cracauer said:
> Didn't we use top have a linux-strace port?
> 
> It seems that there is currently no stracing tool which would resolve
> Linux system calls to some text description.
> 
> Using the strace Linux binary fails with an invalid argument to
> ptrace:
> ./strace /compat/linux/bin/cat 
> execve("/compat/linux/bin/cat", ["/compat/linux/bin/cat"], [/* 56 vars
> */]) = 0
> trace: ptrace(PTRACE_SYSCALL, ...): Invalid argument
> 
> FreeBSD truss of the above strace ends with:
> linux_ptrace(0x18,0x17c41,0x1,0x0)               ERR#22 'Invalid argument'
> trace: ptrace(PTRACE_SYSCALL, ...): Invalid argument

I don't think you can trace a program that's tracing another program.

> What are people using these days?

I just use truss.  It understands the linux syscalls just fine.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-emulation mailing list