Sun.betty
2007-Apr-16 08:51 UTC
[dtrace-discuss] about how to know syscall function have what arguments? and argument type ?
Hi! everybody here. How are you! In Solaris Dynamic Tracing Guide have follow sentence : For all syscall probes, the function name is set to be the name of the instrumented system call. and For entry probes, the arguments (arg0 .... argn) are the arguments to the system call. When I read syscall::write:entry /pid == $1/ { printf("%s(%d , 0x%x , %4d)" , probefunc , arg0 , arg1 , arg2); } My question is : where can I find out "write" system call that have how many arguments ? type of each argument. in other words , I want to find source program of "write" or source program of others system call function. Thanks, Sincerely -------------------------- Betty --------------------------------- ????????-3.5G???20M??? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20070416/fbf0f964/attachment.html>
Gonzalo Siero
2007-Apr-16 08:59 UTC
[dtrace-discuss] about how to know syscall function have what arguments? and argument type ?
Hi,> where can I find out "write" system call that have how many arguments ? > type of each argument. in other words , I want to find source program > of "write" > or source program of others system call function.The description of the syscall are in section 2 of man pages so for example to know about write(2) syscall and it''s arguments: # man -s2 write System Calls write(2) NAME write, pwrite, writev - write on a file SYNOPSIS #include <unistd.h> ssize_t write(int fildes, const void *buf, size_t nbyte); [...] For the source code you can search (identifier) for write in: http://cvs.opensolaris.org/source/ and then look for the function in "/onnv/onnv-gate/usr/src/uts/common/syscall/" section. Cheers, Gonzalo. Sun.betty wrote:> Hi! everybody here. > How are you! > > In Solaris Dynamic Tracing Guide have follow sentence : > > For all syscall probes, the function name is set to be the name of the > instrumented system call. > > and > For entry probes, the arguments (arg0 .... argn) are the arguments to > the system call. > > When I read > syscall::write:entry > /pid == $1/ > { > printf("%s(%d , 0x%x , %4d)" , probefunc , arg0 , arg1 , arg2); > } > > My question is : > where can I find out "write" system call that have how many arguments ? > type of each argument. in other words , I want to find source program > of "write" > or source program of others system call function. > > > Thanks, Sincerely > -------------------------- > Betty > > > ------------------------------------------------------------------------ > ????????-3.5G???20M??? <http://cn.mail.yahoo.com> > > > ------------------------------------------------------------------------ > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org
Fintan Ryan
2007-Apr-16 09:03 UTC
[dtrace-discuss] about how to know syscall function have what arguments? and argument type ?
For the sourcecode take a look at http://src.opensolaris.org For your arguments, the quickest place to look is just in the manpages, followed by header files. A man -s2 write gives you all the details you need for your question. - F. Sun.betty wrote:> Hi! everybody here. > How are you! > > In Solaris Dynamic Tracing Guide have follow sentence : > > For all syscall probes, the function name is set to be the name of the > instrumented system call. > > and > For entry probes, the arguments (arg0 .... argn) are the arguments to > the system call. > > When I read > syscall::write:entry > /pid == $1/ > { > printf("%s(%d , 0x%x , %4d)" , probefunc , arg0 , arg1 , arg2); > } > > My question is : > where can I find out "write" system call that have how many arguments ? > type of each argument. in other words , I want to find source program > of "write" > or source program of others system call function. > > > Thanks, Sincerely > -------------------------- > Betty > > > ------------------------------------------------------------------------ > ????????-3.5G???20M??? <http://cn.mail.yahoo.com> > > > ------------------------------------------------------------------------ > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org