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/Pobjname.3proc
+++ new/usr/src/man/man3proc/Pobjname.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 .\"
↓ open down ↓ |
10 lines elided |
↑ open up ↑ |
11 11 .\"
12 12 .\" Copyright 2015 Joyent, Inc.
13 13 .\"
14 14 .Dd May 11, 2016
15 15 .Dt POBJNAME 3PROC
16 16 .Os
17 17 .Sh NAME
18 18 .Nm Pobjname ,
19 19 .Nm Pobjname_resolved
20 20 .Nd turn a virtual address into its mapped object
21 -.Sh SYNOPSIS
21 +.Sh LIBRARY
22 22 .Lb libproc
23 +.Sh SYNOPSIS
23 24 .In libproc.h
24 25 .Ft "char *"
25 26 .Fo Pobjname
26 27 .Fa "struct ps_prochandle *P"
27 28 .Fa "uintptr_t addr"
28 29 .Fa "char *buffer"
29 30 .Fa "size_t bufsize"
30 31 .Fc
31 32 .Ft char *
32 33 .Fo Pobjname_resolved
33 34 .Fa "struct ps_prochandle *P"
34 35 .Fa "uintptr_t addr"
35 36 .Fa "char *buffer"
36 37 .Fa "size_t bufsize"
37 38 .Fc
38 39 .Sh DESCRIPTION
39 40 The
40 41 .Fn Pobjname
41 42 and
42 43 .Fn Pobjname_resolved
43 44 functions attempt to determine the underlying mapped object that
44 45 contains the virtual address
45 46 .Fa addr
46 47 in the process handle
47 48 .Fa P .
48 49 .Pp
49 50 A program consists of multiple memory mappings.
50 51 Some are provided by the system, such as the stack and the heap.
51 52 While others are created through explicit calls to
52 53 .Xr mmap 2
53 54 or brought in by the run-time link-editor due to dependencies
54 55 specified in binaries and libraries.
55 56 .Pp
56 57 If
57 58 .Fa addr
58 59 is contained in a mapping, then up to
59 60 .Fa bufsize
60 61 characters, including the null terminator,
61 62 of the name of the corresponding object will be written into
62 63 .Fa buffer .
63 64 The
64 65 .Fn Pobjname_resolved
65 66 function attempts to resolve the object to a full file system path.
66 67 If the full file-system path cannot be determined, then it will fall back
67 68 to the name that the run-time link-editor has for that mapping, which is
68 69 the behavior of
69 70 .Fn Pobjname .
70 71 .Sh RETURN VALUES
71 72 Upon successful completion, the
72 73 .Fn Pobjname
73 74 and
74 75 .Fn Pobjname_resolved
75 76 functions return
76 77 .Fa buffer .
77 78 Otherwise,
78 79 .Dv NULL
79 80 is returned to indicate the object name could not be found.
80 81 .Sh INTERFACE STABILITY
81 82 .Sy Uncommitted
82 83 .Sh MT-LEVEL
83 84 See
84 85 .Sy LOCKING
85 86 in
86 87 .Xr libproc 3LIB .
87 88 .Sh SEE ALSO
88 89 .Xr mmap 2 ,
89 90 .Xr libproc 3LIB ,
90 91 .Xr Pobject_iter 3PROC ,
91 92 .Xr proc 4
↓ open down ↓ |
59 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX