Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Aug 2011 09:34:24 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Ashley Williams <ashley.wil@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: dtrace function arguments
Message-ID:  <20110815143424.GA8675@dan.emsphone.com>
In-Reply-To: <CAHTXkPJiYBamiJ%2Bk2h7onhWf0gP8Ycx-bzrax66J=-t3686R8w@mail.gmail.com>
References:  <CAHTXkPJiYBamiJ%2Bk2h7onhWf0gP8Ycx-bzrax66J=-t3686R8w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110815143424.GA8675>