'\" te .\" Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. .TH whocalls 1 "23 April 2014" "SunOS 5.11" "User Commands" .SH NAME whocalls \- report on the calls to a specific procedure .SH SYNOPSIS .LP .nf \fBwhocalls\fR [\fB-l\fR \fIwholib\fR] [\fB-s\fR] \fIfuncname\fR \fIexecutable\fR [\fIarguments\fR]... .fi .SH DESCRIPTION .sp .LP \fBwhocalls\fR is a simple example of a utility based on the \fILink-Auditing\fR functionality of \fBld.so.1\fR(1) that permits the tracking of a given function call. See \fIRuntime Linker Auditing Interface\fR in \fIOracle Solaris 11.3 Linkers and Libraries Guide\fR for more information regarding auditing. .sp .LP The \fIexecutable\fR is run as normal with any associated arguments. Each time the procedure \fIfuncname\fR is called, both the arguments to that procedure and a stack trace are displayed on standard output. .SH OPTIONS .sp .LP The following options are supported: .sp .ne 2 .mk .na \fB\fB-l\fR \fIwholib\fR\fR .ad .RS 13n .rt Specifies an alternate \fBwho.so\fR \fILink-Auditing\fR library to use. .RE .sp .ne 2 .mk .na \fB\fB-s\fR\fR .ad .RS 13n .rt When available, examines and uses the \fB\&.symtab\fR symbol table for local symbols. This is a little more expensive than using the \fB\&.dynsym\fR symbol table, but can produce more detailed stack trace information. .RE .SH EXAMPLES .LP \fBExample 1 \fRTracking Function Calls .sp .LP The following example tracks the calls to \fBprintf()\fR made by a simple \fBhelloworld\fR program: .sp .in +2 .nf example% \fBwhocalls printf helloworld\fR printf(0x106e4, 0xef625310, 0xef621ba8) helloworld:main+0x10 helloworld:_start+0x5c Hello World .fi .in -2 .sp .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Availabilitydeveloper/base-developer-utilities .TE .SH SEE ALSO .sp .LP \fBld.so.1\fR(1), \fBsotruss\fR(1), \fBattributes\fR(5) .sp .LP \fIOracle Solaris 11.3 Linkers and Libraries Guide\fR