Go to main content

man pages section 1: User Commands

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

whocalls(1)

Name

whocalls - report on the calls to a specific procedure

Synopsis

whocalls [-l wholib] [-s] funcname executable 
          [arguments]...

Description

whocalls is a simple example of a utility based on the Link-Auditing functionality of ld.so.1(1) that permits the tracking of a given function call. See Runtime Linker Auditing Interface in Oracle Solaris 11.4 Linkers and Libraries Guide for more information regarding auditing.

The executable is run as normal with any associated arguments. Each time the procedure funcname is called, both the arguments to that procedure and a stack trace are displayed on standard output.

Options

The following options are supported:

–l wholib

Specifies an alternate who.so Link-Auditing library to use.

–s

When available, examines and uses the .symtab symbol table for local symbols. This is a little more expensive than using the .dynsym symbol table, but can produce more detailed stack trace information.

Examples

Example 1 Tracking Function Calls

The following example tracks the calls to printf() made by a simple helloworld program:

example% whocalls printf helloworld
printf(0x106e4, 0xef625310, 0xef621ba8)
        helloworld:main+0x10
        helloworld:_start+0x5c
Hello World

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
developer/base-developer-utilities

See Also

ld.so.1(1), sotruss(1), attributes(7)

Oracle Solaris 11.4 Linkers and Libraries Guide