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
34 .Nd library for run-time linker debugging
41 .Fa "rd_agent_t *rdap"
49 .Fa "rd_agent_t *rdap, rd_event_e event, rd_notify_t *notify"
53 .Fa "rd_agent_t *rdap, int onoff"
57 .Fa "rd_agent_t *rdap, rd_event_msg_t *msg"
65 .Fa "const rd_loadobj_t *, void *"
69 .Fa "rd_agent_t *rdap, rl_iter_f *cb, void *clnt_data"
77 .Fa "struct proc_handle *php"
81 .Fa "rd_agent_t *rdap, size_t padsize"
85 .Fa "rd_agent_t *rdap, uintptr_t pc, struct proc *proc"
86 .Fa "uintptr_t plt_base, rd_plt_info_t *rpi"
90 .Fa "rd_agent_t *rdap"
95 library provides a debugging interface to the run-time linker (rtld).
96 This library must be used along with
99 Most library functions take a
102 This argument is an opaque structure containing information associated with
103 the current status of the agent.
105 Before you start using
112 This initializes the library to the correct version your program was compiled
113 with and provides proper ABI stability.
115 What follows is a description of what each function.
123 argument should be the
129 resets your previously created agent.
132 deallocates the resources associated with the agent.
135 returns an error string describing the error present in
139 enables reporting of events.
140 This function always returns RD_OK.
143 returns the event address corresponding to the
146 At the moment we only report events of type RD_NOTIFY_BPT.
149 returns the message associated with the latest event.
150 At the moment only RD_POSTINIT events are supported.
153 allows you to iterate over the program's loaded objects.
155 is a callback of type
158 Most functions return an
161 The error codes are described in the header file for this library.
162 You can get the error string using
173 library first appeared in
175 and was modeled after the same library present in the Solaris operating system.
179 library and this manual page were written by
180 .An Rui Paulo Aq Mt rpaulo@FreeBSD.org
181 under sponsorship from the FreeBSD Foundation.
184 .Fn rd_event_enable ,
188 .Fn rd_plt_resolution
189 are not yet implemented.