On Tue, Dec 04, 2007 at 12:16:32AM -0800, Richard L. Hamilton wrote:
> > How do I determine the system calls that are made by
> > svc_register()? 
> 
> You could always write a program that calls it, and truss that program.
> if you put a write(1,"-----",5)  or something recognizable like that
> right before the call, it should be easy to spot in the output and ignore
> everything before that (i.e. all the dynamic linking at startup and such).

Truss: feh. Use DTrace:

pid$target::svc_register:entry
{
        self->follow = 1;
}

syscall:::entry
/self->follow/
{
        @[probefunc] = count();
}

pid$target::svc_register:return
/self->follow/
{
        self->follow = 0;
}

It looks like there's an ioctl in there that you could use to uniquely
identify such calls:

syscall::ioctl:entry
/self->follow/
{
        @ioctl[arg0] = count();
}

Then verify with another DTrace invocation:

# dtrace -n 'syscall::ioctl:entry/arg0 == <value>/{ @[ustack()] = count(); }'

Adam

-- 
Adam Leventhal, FishWorks                        http://blogs.sun.com/ahl
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to