1whocalls(1) User Commands whocalls(1)
2
3
4
6 whocalls - report on the calls to a specific procedure
7
9 whocalls [-l wholib] [-s] funcname executable
10 [arguments]...
11
12
14 whocalls is a simple example of a utility based on the Link-Auditing
15 functionality of ld.so.1(1) that permits the tracking of a given func‐
16 tion call. See the Linker and Libraries Guide for a detailed descrip‐
17 tion of the Link-Auditing mechanism. The executable is run as normal
18 with any associated arguments. Each time the procedure funcname is
19 called, both the arguments to that procedure and a stack trace are dis‐
20 played on standard output.
21
23 The following options are supported:
24
25 -l wholib Specifies an alternate who.so Link-Auditing library to
26 use.
27
28
29 -s When available, examines and uses the .symtab symbol table
30 for local symbols. This is a little more expensive than
31 using the .dynsym symbol table, but can produce more
32 detailed stack trace information.
33
34
36 Example 1 Tracking Function Calls
37
38
39 The following example tracks the calls to printf() made by a simple
40 helloworld program:
41
42
43 example% whocalls printf helloworld
44 printf(0x106e4, 0xef625310, 0xef621ba8)
45 helloworld:main+0x10
46 helloworld:_start+0x5c
47 Hello World
48
49
50
52 See attributes(5) for descriptions of the following attributes:
53
54
55
56
57 ┌─────────────────────────────┬─────────────────────────────┐
58 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
59 ├─────────────────────────────┼─────────────────────────────┤
60 │Availability │SUNWtoo │
61 └─────────────────────────────┴─────────────────────────────┘
62
64 ld.so.1(1), sotruss(1), attributes(5)
65
66
67 Linker and Libraries Guide
68
69
70
71SunOS 5.11 3 Jul 2007 whocalls(1)