Print this page
11583 Some man3lib pages are missing parts of the SYNOPSIS
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3lib/libc_db.3lib.man.txt
+++ new/usr/src/man/man3lib/libc_db.3lib.man.txt
1 1 LIBC_DB(3LIB) Interface Libraries LIBC_DB(3LIB)
2 2
3 3
4 4
5 5 NAME
6 6 libc_db - threads debugging library
7 7
8 8 SYNOPSIS
9 - cc [ flag ... ] file ... -lc_db [ library ... ]
9 + cc [ flag... ] file... -lc_db [ library... ]
10 10 #include <proc_service.h>
11 11 #include <thread_db.h>
12 12
13 13
14 14 DESCRIPTION
15 15 The libc_db library provides support for monitoring and manipulating
16 16 threads-related aspects of a multithreaded program. There are at least
17 17 two processes involved, the controlling process and one or more target
18 18 processes. The controlling process is the libc_db client, which links
19 19 with libc_db and uses libc_db to inspect or modify threads-related
20 20 aspects of one or more target processes. The target processes must be
21 - multithreaded processes that use libc. The controlling process mignt or
21 + multithreaded processes that use libc. The controlling process might or
22 22 might not be multithreaded itself.
23 23
24 24
25 25 The most commonly anticipated use for libc_db is that the controlling
26 26 process will be a debugger for a multithreaded program, hence the "db"
27 27 in libc_db.
28 28
29 29
30 30 The libc_db library is dependent on the internal implementation details
31 31 of libc. It is a "friend" of libc in the C++ sense, which is precisely
32 32 the "value added" by libc_db. It encapsulates the knowledge of libc
33 33 internals that a debugger needs to manipulate the threads-related state
34 34 of a target process.
35 35
36 36
37 37 To be able to inspect and manipulate target processes, libc_db makes
38 38 use of certain process control primitives that must be provided by the
39 39 process using libc_db. The imported interfaces are defined in
40 40 proc_service(3PROC). In other words, the controlling process is linked
41 41 with libc_db and calls routines in libc_db. In turn, libc_db calls
42 42 certain routines that it expects the controlling process to provide.
43 43 These process control primitives allow libc_db to:
44 44
45 45 o Look up symbols in a target process.
46 46
47 47 o Stop and continue individual lightweight processes ( LWPs)
48 48 within a target process.
49 49
50 50 o Stop and continue an entire target process.
51 51
52 52 o Read and write memory and registers in a target process.
53 53
54 54
55 55 Initially, a controlling process obtains a handle for a target process.
56 56 Through that handle it can then obtain handles for the component
57 57 objects of the target process, its threads, its synchronization
58 58 objects, and its thread-specific-data keys.
59 59
60 60
61 61 When libc_db needs to return sets of handles to the controlling
62 62 process, for example, when returning handles for all the threads in a
63 63 target process, it uses an iterator function. An iterator function
64 64 calls back a client-specified function once for each handle to be
65 65 returned, passing one handle back on each call to the callback
66 66 function. The calling function also passes another parameter to the
67 67 iterator function, which the iterator function passes on to the
68 68 callback function. This makes it easy to build a linked list of thread
69 69 handles for a particular target process. The additional parameter is
70 70 the head of the linked list, and the callback function simply inserts
71 71 the current handle into the linked list.
72 72
73 73
74 74 Callback functions are expected to return an integer. Iteration
75 75 terminates early if a callback function returns a non-zero value.
76 76 Otherwise, iteration terminates when there are no more handles to pass
77 77 back.
78 78
79 79 INTERFACES
80 80 The shared object libc_db.so.1 provides the public interfaces defined
81 81 below. See Intro(3) for additional information on shared object
82 82 interfaces.
83 83
84 84
85 85
86 86
87 87 td_init td_log
88 88 td_sync_get_info td_sync_get_stats
89 89 td_sync_setstate td_sync_waiters
90 90 td_ta_clear_event td_ta_delete
91 91 td_ta_enable_stats td_ta_event_addr
92 92 td_ta_event_getmsg td_ta_get_nthreads
93 93 td_ta_get_ph td_ta_get_stats
94 94 td_ta_map_addr2sync td_ta_map_id2thr
95 95 td_ta_map_lwp2thr td_ta_new
96 96 td_ta_reset_stats td_ta_set_event
97 97 td_ta_setconcurrency td_ta_sync_iter
98 98 td_ta_sync_tracking_enable td_ta_thr_iter
99 99 td_ta_tsd_iter td_thr_clear_event
100 100 td_thr_dbresume td_thr_dbsuspend
101 101 td_thr_event_enable td_thr_event_getmsg
102 102 td_thr_get_info td_thr_getfpregs
103 103 td_thr_getgregs td_thr_getxregs
104 104 td_thr_getxregsize td_thr_lockowner
105 105 td_thr_set_event td_thr_setfpregs
106 106 td_thr_setgregs td_thr_setprio
107 107 td_thr_setsigpending td_thr_setxregs
108 108 td_thr_sigsetmask td_thr_sleepinfo
109 109 td_thr_tsd td_thr_validate
110 110
111 111
112 112 FILES
113 113 /lib/libc_db.so.1
114 114 shared object
115 115
116 116
117 117 /lib/64/libc_db.so.1
118 118 64-bit shared object
119 119
120 120
121 121 ATTRIBUTES
122 122 See attributes(5) for description of the following attributes:
123 123
124 124
125 125
126 126
↓ open down ↓ |
95 lines elided |
↑ open up ↑ |
127 127 +---------------+-----------------+
128 128 |ATTRIBUTE TYPE | ATTRIBUTE VALUE |
129 129 |MT-Level | Safe |
130 130 +---------------+-----------------+
131 131
132 132 SEE ALSO
133 133 Intro(3), td_ta_new(3C_DB), attributes(5), threads(5)
134 134
135 135
136 136
137 - March 24, 2004 LIBC_DB(3LIB)
137 + August 19, 2019 LIBC_DB(3LIB)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX