In the last episode (May 21), Christian Weisgerber said:
> Arun Sharma <[EMAIL PROTECTED]> 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
        [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to