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/Plookup_by_addr.3proc.man.txt
+++ new/usr/src/man/man3proc/Plookup_by_addr.3proc.man.txt
1 1 PLOOKUP_BY_ADDR(3PROC) Process Control Library Functions
2 2
3 3 NAME
4 4 Plookup_by_addr, Pxlookup_by_addr, Pxlookup_by_addr_resolved,
5 5 Plookup_by_name, Pxlookup_by_name - lookup symbols in a process
6 6
7 -SYNOPSIS
7 +LIBRARY
8 8 Process Control Library (libproc, -lproc)
9 +
10 +SYNOPSIS
9 11 #include <libproc.h>
10 12
11 13 int
12 14 Plookup_by_addr(struct ps_prochandle *P, uintptr_t addr, char *buf,
13 15 size_t size, Gelf_Sym *symp);
14 16
15 17 int
16 18 Pxlookup_by_addr(struct ps_prochandle *P, uintptr_t addr, char *buf,
17 19 size_t size, Gelf_Sym *symp, prsyminfo_t *sip);
18 20
19 21 int
20 22 Pxlookup_by_addr_resolved(struct ps_prochandle *P, uintptr_t addr,
21 23 char *buf, size_t size, Gelf_Sym *symp, prsyminfo_t *sip);
22 24
23 25 int
24 26 Plookup_by_name(struct ps_prochandle *P, const char *object,
25 27 const char *symbol, GElf_Sym *symp);
26 28
27 29 int
28 30 Pxlookup_by_name(struct ps_prochandle *P, Lmid_t lmid,
29 31 const char *object, const char *symbol, GElf_Sym *symp,
30 32 prsyminfo_t *sip);
31 33
32 34 DESCRIPTION
33 35 The Plookup_by_addr(), Pxlookup_by_addr(), Pxlookup_by_addr_resolved(),
34 36 Plookup_by_name(), and Pxlookup_by_name() functions look up symbol
35 37 information in the process handle P and fill in the ELF symbol
36 38 information in symp with the found symbol. Symbols may be looked up both
37 39 by address and name.
38 40
39 41 The Plookup_by_addr() function looks up symbol information corresponding
40 42 to the address addr. If found, up to size bytes of the symbol's name,
41 43 including the null terminator will be filled in to the buffer buf.
42 44
43 45 The Pxlookup_by_addr() function is identical to the Plookup_by_addr()
44 46 function, except that it also fills in the structure sip with additional
45 47 information. The definition of the prsyminfo_t is found in
46 48 libproc(3LIB).
47 49
48 50 The Pxlookup_by_addr_resolved() function is similar to the
49 51 Pxlookup_by_addr() function; however, it attempts to resolve the paths
50 52 present in the prsyminfo_t to an absolute path on the file system.
51 53
52 54 The Plookup_by_name() function attempts to look up a symbol based on its
53 55 name. The object argument allows the caller to specify a specific object
54 56 that was mapped in by the run-time link-editor to search for symbol in.
55 57 The system provides three special values which may be passed in for
56 58 object. The value PR_OBJ_EXEC refers to the executable's object (a.out).
57 59 The value PR_OBJ_LDSO refers to the object ld.so.1. The value
58 60 PR_OBJ_EVERY indicates that every object should be searched.
59 61
60 62 The Pxlookup_by_name() function is similar to the Plookup_by_name()
61 63 function; however, it allows a link-map identifier, lmid, to be specified
62 64 and also provides additional information about the symbol in the form of
63 65 the prsyminfo_t sip. The specification of lmid restricts the search for
64 66 the object named object and symbol named symbol to the specified link-
65 67 map.
66 68
67 69 There are three special link-map identifiers that may be passed in. The
68 70 symbol PR_LMID_EVERY indicates that every link-map should be searched.
69 71 The symbol LM_ID_BASE indicates that the base link-map, the one that is
70 72 used for the executable should be searched. Finally, the symbol
71 73 LM_ID_LDSO refers to the link-map that is used by the run-time link
72 74 editor, ld.so.1. The Plookup_by_name() function behaves like
73 75 Pxlookup_by_name() when the PR_LMID_EVERY argument is passed to lmid,
74 76 indicating that every link-map should be searched.
75 77
76 78 RETURN VALUES
77 79 Upon successful completion, the Plookup_by_addr(), Pxlookup_by_addr(),
78 80 Pxlookup_by_addr_resolved(), Plookup_by_name(), and Pxlookup_by_name()
79 81 functions return 0 and fill in the symbol information. Otherwise, -1 is
80 82 returned to indicate that the symbol could not be found.
81 83
82 84 INTERFACE STABILITY
83 85 Uncommitted
84 86
85 87 MT-LEVEL
86 88 See LOCKING in libproc(3LIB).
87 89
88 90 SEE ALSO
89 91 elf(3ELF), gelf(3ELF), libproc(3LIB), proc(4)
90 92
91 93 illumos May 11, 2016 illumos
↓ open down ↓ |
73 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX