2 .\" Copyright (c) 2010 The FreeBSD Foundation
3 .\" All rights reserved.
5 .\" This software was developed by Rui Paulo under sponsorship from
6 .\" the FreeBSD Foundation.
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\" notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\" notice, this list of conditions and the following disclaimer in the
15 .\" documentation and/or other materials provided with the distribution.
17 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 .Nd library for run-time linker debugging
43 .Fa "rd_agent_t *rdap"
51 .Fa "rd_agent_t *rdap, rd_notify_t *notify"
55 .Fa "rd_agent_t *rdap, int onoff"
59 .Fa "rd_agent_t *rdap, rd_event_msg_t *msg"
67 .Fa "const rd_loadobj_t *, void *"
71 .Fa "rd_agent_t *rdap, rl_iter_f *cb, void *clnt_data"
79 .Fa "struct proc_handle *php"
83 .Fa "rd_agent_t *rdap, size_t padsize"
87 .Fa "rd_agent_t *rdap, uintptr_t pc, struct proc *proc"
88 .Fa "uintptr_t plt_base, rd_plt_info_t *rpi"
92 .Fa "rd_agent_t *rdap"
97 library provides a debugging interface to the run-time linker (rtld).
98 This library must be used along with
101 Most library functions take a
104 This argument is an opaque structure containing information associated with
105 the current status of the agent.
107 Before you start using
114 This initializes the library to the correct version your program was compiled
115 with and provides proper ABI stability.
117 What follows is a description of what each function.
125 argument should be the
131 resets your previously created agent.
134 deallocates the resources associated with the agent.
137 returns an error string describing the error present in
141 enables reporting of events.
142 This function always returns RD_OK.
145 returns the event address in the
148 At the moment we only report RD_NOTIFY_BPT events.
151 returns the message associated with the latest event.
152 At the moment only RD_POSTINIT events are supported.
155 allows you to iterate over the program's loaded objects.
157 is a callback of type
160 Most functions return an
163 The error codes are described in the header file for this library.
164 You can get the error string using
175 library first appeared in
177 and was modeled after the same library present in the Solaris operating system.
181 library and this manual page were written by
182 .An Rui Paulo Aq rpaulo@FreeBSD.org
183 under sponsorship from the FreeBSD Foundation.
186 .Fn rd_event_enable ,
190 .Fn rd_plt_resolution
191 are not yet implemented.