Date: Sun, 21 May 2000 20:06:06 -0500 From: Dan Nelson <dnelson@emsphone.com> To: Christian Weisgerber <naddy@mips.inka.de> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: truss -f, updated patch Message-ID: <20000521200606.F12386@dan.emsphone.com> In-Reply-To: <8g8ksb$lf2$1@bigeye.rhein-neckar.de>; from "Christian Weisgerber" on Sun May 21 14:30:03 GMT 2000 References: <20000521002953.A5031@sharmas.dhs.org> <8g8ksb$lf2$1@bigeye.rhein-neckar.de>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (May 21), Christian Weisgerber said: > Arun Sharma <adsharma@sharmas.dhs.org> wrote: > > > http://sharmas.dhs.org/~adsharma/projects/freebsd/truss-diff.gz > > Those gratuitous whitespace and formatting changes are a pain... > > Related question: > Currently, truss does very little parsing of syscall arguments. > That table in syscalls.c looks anemic. Is there any interest in > expanding this? I guess that's something I could take on, as it > appears to be mostly grunt work. I had worked on this a little, but had too much trouble keeping the binary compatible with our emulation code. Also printing syscall args can get pretty hairy if you want to do it *right*. Here's a snippet of an email I sent to another guy that was interested in rewriting truss, about 6 months ago: Specifiers are nice for the simple types, like int, float, and string, but how do you specify that a sycall takes a pointer to a struct timeval, without actually writing "struct timeval *"? You end up rewriting the contents of syscalls.master :) Although you *do* need to specify somewhere which arguments are IN/OUT/BOTH. Like stat(). You only want to print the "struct stat" contents after the syscall has returned. The opposite is the case for utimes(). You want to print the "struct timeval" before the call. Then you have functions like poll() or select(), that modify a structure, so you need to print it before and after. I had patterened my code after a free version of truss for Digital Unix. -- Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000521200606.F12386>