dtrace function arguments

Dan Nelson dnelson at allantgroup.com
Mon Aug 15 14:34:27 UTC 2011


In the last episode (Aug 15), Ashley Williams said:
> I'm looking for a faster way to get more verbose information about
> dtrace function arguments.
> 
> For example.
> 
> Say, I want to know more about the funciton
> syscall:freebsd32:connect:return.  I'd start off by doing a listing:
> 
> # dtrace -lvf connect
[...]
>         Argument Types
>                 args[0]: int
>                 args[1]: caddr_t
>                 args[2]: int
> 
> From the output of the listing, I can see quite clearly there are three
> arguments for this function - int, caddr_t, int; but I can't see from this
> output what these refer to.
>
> I could probably find the answer by digging through header files and
> source code, but this isn't exactly efficient.  Is there an easier way to
> find more information about functions (not specifically this one)? 

All syscalls should have a manpage documenting their arguments, and some
common kernel functions have manpages in section 9 (so "man 9 malloc" will
get the kernel version, for example), but most kernel functions aren't
officially documented apart from comments in the source. 

http://fxr.watson.org/ is a handy resource for finding where in the source
tree a given function is defined.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-questions mailing list