whocalls — Report on the Calls to a Specific Procedure

Synopsis

/usr/ccs/bin/whocalls whocalls [-l wholib] funcname
						executable [executable arguments...] 

Description

The whocalls command is based on the Link-Auditing library that permits the tracking of a given function call. See Linker and Libraries Guide for more information. The executable is run as normal. Each time the procedure funcname is called, both the arguments to that procedure and a stack trace are displayed on standard output.

Options

-l wholib Specify an alternate who.so Link-Auditing library to use.

Examples

This examples tracks the calls to printf() made by a simple hello_world program.

castle% whocalls printf hello printf(0x106e4, 0xef625310, 0xef621ba8) hello:main+0x10 ...

Get Solaris™ 7 Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.