From owner-freebsd-questions@FreeBSD.ORG Mon Aug 15 14:34:27 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 559D7106566C for ; Mon, 15 Aug 2011 14:34:27 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email2.allantgroup.com (email2.emsphone.com [199.67.51.116]) by mx1.freebsd.org (Postfix) with ESMTP id 017D28FC12 for ; Mon, 15 Aug 2011 14:34:26 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email2.allantgroup.com (8.14.4/8.14.4) with ESMTP id p7FEYPhs046067 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 15 Aug 2011 09:34:26 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.5/8.14.5) with ESMTP id p7FEYPMm073251 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 15 Aug 2011 09:34:25 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.5/8.14.5/Submit) id p7FEYP7I073249; Mon, 15 Aug 2011 09:34:25 -0500 (CDT) (envelope-from dan) Date: Mon, 15 Aug 2011 09:34:24 -0500 From: Dan Nelson To: Ashley Williams Message-ID: <20110815143424.GA8675@dan.emsphone.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 8.2-STABLE User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.97.2 at email2.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (email2.allantgroup.com [199.67.51.78]); Mon, 15 Aug 2011 09:34:26 -0500 (CDT) X-Scanned-By: MIMEDefang 2.68 on 199.67.51.78 Cc: freebsd-questions@freebsd.org Subject: Re: dtrace function arguments X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Aug 2011 14:34:27 -0000 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