Print this page
8158 Want named threads API
9857 proc manpages should have LIBRARY section
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3proc/Paddr_to_ctf.3proc
+++ new/usr/src/man/man3proc/Paddr_to_ctf.3proc
1 1 .\"
2 2 .\" This file and its contents are supplied under the terms of the
3 3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 4 .\" You may only use this file in accordance with the terms of version
5 5 .\" 1.0 of the CDDL.
6 6 .\"
7 7 .\" A full copy of the text of the CDDL should have accompanied this
8 8 .\" source. A copy of the CDDL is also available via the Internet at
9 9 .\" http://www.illumos.org/license/CDDL.
10 10 .\"
11 11 .\"
↓ open down ↓ |
11 lines elided |
↑ open up ↑ |
12 12 .\" Copyright 2015 Joyent, Inc.
13 13 .\"
14 14 .Dd May 11, 2016
15 15 .Dt PADDR_TO_CTF 3PROC
16 16 .Os
17 17 .Sh NAME
18 18 .Nm Paddr_to_ctf ,
19 19 .Nm Plmid_to_ctf ,
20 20 .Nm Pname_to_ctf
21 21 .Nd lookup CTF data
22 -.Sh SYNOPSIS
22 +.Sh LIBRARY
23 23 .Lb libproc
24 +.Sh SYNOPSIS
24 25 .In libproc.h
25 26 .Ft "ctf_file_t *"
26 27 .Fo Paddr_to_ctf
27 28 .Fa "struct ps_prochandle *P"
28 29 .Fa "uintptr_t addr"
29 30 .Fc
30 31 .Ft "ctf_file_t *"
31 32 .Fo Plmid_to_ctf
32 33 .Fa "struct ps_prochandle *P"
33 34 .Fa "Lmid_t lmid"
34 35 .Fa "const char *name"
35 36 .Fc
36 37 .Ft "ctf_file_t *"
37 38 .Fo Pname_to_ctf
38 39 .Fa "struct ps_prochandle *P"
39 40 .Fa "const char *name"
40 41 .Fc
41 42 .Sh DESCRIPTION
42 43 The
43 44 .Fn Paddr_to_ctf ,
44 45 .Fn Plmid_to_ctf ,
45 46 and
46 47 .Fn Pname_to_ctf
47 48 functions lookup CTF (Compact C Type Format) data, for use with
48 49 .Sy libctf ,
49 50 from the process represented by the handle
50 51 .Fa P .
51 52 In all cases, the CTF sections of both the running executable and its
52 53 shared libraries are searched.
53 54 .Pp
54 55 The CTF container returned is valid as long as the process handle
55 56 .Fa P
56 57 is valid.
57 58 That is, until a call to
58 59 .Xr Prelease 3PROC
59 60 is made.
60 61 Further, consumers must not close the CTF container.
61 62 .Pp
62 63 The
63 64 .Fn Paddr_to_ctf
64 65 function attempts to find the CTF section, if any, that exists for the
65 66 address
66 67 .Fa addr .
67 68 Note, not all addresses correspond to memory regions that have CTF
68 69 data.
69 70 For example, if a user creates a region of anonymous memory through the
70 71 .Xr mmap 2
71 72 function, then it will not have any corresponding CTF information.
72 73 .Pp
73 74 The
74 75 .Fn Pname_to_ctf
75 76 function looks up the object named
76 77 .Fa name
77 78 and returns the corresponding CTF section, if any exists.
78 79 Two special values may be used for name.
79 80 The macro
80 81 .Dv PR_OBJ_EXEC
81 82 refers to the executable object itself and the macro
82 83 .Dv PR_OBJ_LDSO refers to the object ld.so.1 .
83 84 .Pp
84 85 The
85 86 .Fn Plmid_to_ctf
86 87 function is similar to
87 88 .Fn Pname_to_ctf .
88 89 It allows the passing of a link-map identifier,
89 90 .Fa lmid ,
90 91 which constricts the search of the object named with
91 92 .Fa name
92 93 to that link-map.
93 94 The special value of
94 95 .Dv PR_LMID_EVERY
95 96 indicates that every link-map should be searched, which is equivalent
96 97 in behavior to the
97 98 .Fn Pname_to_ctf
98 99 function.
99 100 .Sh RETURN VALUES
100 101 Upon successful completion, the
101 102 .Fn Paddr_to_ctf ,
102 103 .Fn Plmid_to_ctf ,
103 104 and
104 105 .Fn Pname_to_ctf
105 106 functions return a pointer to the corresponding CTF container.
106 107 Otherwise, if none exists then
107 108 .Dv NULL
108 109 is returned.
109 110 .Sh INTERFACE STABILITY
110 111 .Sy Uncommitted
111 112 .Sh MT-LEVEL
112 113 See
113 114 .Sy LOCKING
114 115 in
115 116 .Xr libproc 3LIB .
116 117 .Sh SEE ALSO
117 118 .Xr libproc 3LIB ,
118 119 .Xr ctf 4
↓ open down ↓ |
85 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX