Beat Vontobel writes:
> actually returning the two file descriptors as fildes[0] and  
> fildes[1], I always get fildes[0] in arg0 (and arg1) inside  
> syscall::pipe:return. But where is fildes[1]? I thought I'd probably  
> need to get the pointer and then use copyin() -- but I just can't  
> figure out how...
> 
>       syscall::pipe:entry
>       {
>         /* Any possibility to get a pointer here already to be assigned to  
> self->something to help me in "return"? */

You'd ordinarily be on the right sort of path with this:

        self->filedes = arg0;

... but the syscall provider is weird.  It exposes implementation
details, such as how arguments are returned for 64-bit kernels.  In
this case, the two file descriptors are passed back in one argument,
so just do something like this:

#!/usr/sbin/dtrace -qs -

syscall::pipe:return
{
        printf("pipe(%d, %d) in %s\n", arg0 & 0xffffffff, arg0 >> 32,
            execname);
        ustack();
}

-- 
James Carlson, Solaris Networking              <[EMAIL PROTECTED]>
Sun Microsystems / 35 Network Drive        71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to