blob: be2ad828a2c1cda271da2c46448c278b5af859d4 [file] [log] [blame]
Ulrich Drepperb08d5a82005-07-26 05:00:05 +00001/* Internal definitions for libdwfl.
Roland McGrathbca43152009-01-05 23:59:32 -08002 Copyright (C) 2005, 2006, 2007, 2008, 2009 Red Hat, Inc.
Ulrich Drepper361df7d2006-04-04 21:38:57 +00003 This file is part of Red Hat elfutils.
Ulrich Drepperb08d5a82005-07-26 05:00:05 +00004
Ulrich Drepper361df7d2006-04-04 21:38:57 +00005 Red Hat elfutils is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by the
7 Free Software Foundation; version 2 of the License.
Ulrich Drepperb08d5a82005-07-26 05:00:05 +00008
Ulrich Drepper361df7d2006-04-04 21:38:57 +00009 Red Hat elfutils is distributed in the hope that it will be useful, but
10 WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
13
14 You should have received a copy of the GNU General Public License along
15 with Red Hat elfutils; if not, write to the Free Software Foundation,
Ulrich Drepper1e9ef502006-04-04 22:29:06 +000016 Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
Ulrich Drepper361df7d2006-04-04 21:38:57 +000017
18 In addition, as a special exception, Red Hat, Inc. gives You the
19 additional right to link the code of Red Hat elfutils with code licensed
20 under any Open Source Initiative certified open source license
21 (http://www.opensource.org/licenses/index.php) which requires the
22 distribution of source code with any binary distribution and to
23 distribute linked combinations of the two. Non-GPL Code permitted under
24 this exception must only link to the code of Red Hat elfutils through
25 those well defined interfaces identified in the file named EXCEPTION
26 found in the source code files (the "Approved Interfaces"). The files
27 of Non-GPL Code may instantiate templates or use macros or inline
28 functions from the Approved Interfaces without causing the resulting
29 work to be covered by the GNU General Public License. Only Red Hat,
30 Inc. may make changes or additions to the list of Approved Interfaces.
31 Red Hat's grant of this exception is conditioned upon your not adding
32 any new exceptions. If you wish to add a new Approved Interface or
33 exception, please contact Red Hat. You must obey the GNU General Public
34 License in all respects for all of the Red Hat elfutils code and other
35 code used in conjunction with Red Hat elfutils except the Non-GPL Code
36 covered by this exception. If you modify this file, you may extend this
37 exception to your version of the file, but you are not obligated to do
38 so. If you do not wish to provide this exception without modification,
39 you must delete this exception statement from your version and license
40 this file solely under the GPL without exception.
41
42 Red Hat elfutils is an included package of the Open Invention Network.
43 An included package of the Open Invention Network is a package for which
44 Open Invention Network licensees cross-license their patents. No patent
45 license is granted, either expressly or impliedly, by designation as an
46 included package. Should you wish to participate in the Open Invention
47 Network licensing program, please visit www.openinventionnetwork.com
48 <http://www.openinventionnetwork.com>. */
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000049
50#ifndef _LIBDWFLP_H
51#define _LIBDWFLP_H 1
52
Roland McGrath55d34a52007-06-08 22:22:01 +000053#ifndef PACKAGE_NAME
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000054# include <config.h>
55#endif
56#include <libdwfl.h>
57#include <libebl.h>
58#include <assert.h>
59#include <errno.h>
60#include <stdbool.h>
61#include <stdlib.h>
62#include <string.h>
63
Roland McGrath4959bf82005-08-09 10:31:08 +000064#include "../libdw/libdwP.h" /* We need its INTDECLs. */
65
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000066/* gettext helper macros. */
67#define _(Str) dgettext ("elfutils", Str)
68
69#define DWFL_ERRORS \
70 DWFL_ERROR (NOERROR, N_("no error")) \
71 DWFL_ERROR (UNKNOWN_ERROR, N_("unknown error")) \
72 DWFL_ERROR (NOMEM, N_("out of memory")) \
73 DWFL_ERROR (ERRNO, N_("See errno")) \
74 DWFL_ERROR (LIBELF, N_("See elf_errno")) \
75 DWFL_ERROR (LIBDW, N_("See dwarf_errno")) \
76 DWFL_ERROR (LIBEBL, N_("See ebl_errno (XXX missing)")) \
Roland McGrathbca43152009-01-05 23:59:32 -080077 DWFL_ERROR (ZLIB, N_("gzip decompression failed")) \
78 DWFL_ERROR (BZLIB, N_("bzip2 decompression failed")) \
Roland McGrath07d4f2f2005-10-28 06:56:24 +000079 DWFL_ERROR (UNKNOWN_MACHINE, N_("no support library found for machine")) \
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000080 DWFL_ERROR (NOREL, N_("Callbacks missing for ET_REL file")) \
81 DWFL_ERROR (BADRELTYPE, N_("Unsupported relocation type")) \
82 DWFL_ERROR (BADRELOFF, N_("r_offset is bogus")) \
83 DWFL_ERROR (BADSTROFF, N_("offset out of range")) \
84 DWFL_ERROR (RELUNDEF, N_("relocation refers to undefined symbol")) \
85 DWFL_ERROR (CB, N_("Callback returned failure")) \
86 DWFL_ERROR (NO_DWARF, N_("No DWARF information found")) \
87 DWFL_ERROR (NO_SYMTAB, N_("No symbol table found")) \
88 DWFL_ERROR (NO_PHDR, N_("No ELF program headers")) \
89 DWFL_ERROR (OVERLAP, N_("address range overlaps an existing module")) \
90 DWFL_ERROR (ADDR_OUTOFRANGE, N_("address out of range")) \
91 DWFL_ERROR (NO_MATCH, N_("no matching address range")) \
92 DWFL_ERROR (TRUNCATED, N_("image truncated")) \
Roland McGrath59ea7f32007-10-04 08:50:09 +000093 DWFL_ERROR (ALREADY_ELF, N_("ELF file opened")) \
Roland McGrathe47ab762005-11-17 03:16:00 +000094 DWFL_ERROR (BADELF, N_("not a valid ELF file")) \
95 DWFL_ERROR (WEIRD_TYPE, N_("cannot handle DWARF type description"))
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000096
97#define DWFL_ERROR(name, text) DWFL_E_##name,
98typedef enum { DWFL_ERRORS DWFL_E_NUM } Dwfl_Error;
99#undef DWFL_ERROR
100
101#define OTHER_ERROR(name) ((unsigned int) DWFL_E_##name << 16)
102#define DWFL_E(name, errno) (OTHER_ERROR (name) | (errno))
103
Roland McGrathd11f9cb2008-03-26 20:51:59 +0000104extern int __libdwfl_canon_error (Dwfl_Error) internal_function;
105extern void __libdwfl_seterrno (Dwfl_Error) internal_function;
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000106
107struct Dwfl
108{
109 const Dwfl_Callbacks *callbacks;
110
111 Dwfl_Module *modulelist; /* List in order used by full traversals. */
112
Roland McGrathd17fac72005-08-23 08:20:21 +0000113 GElf_Addr offline_next_address;
Roland McGrathb4d6f0f2008-08-25 22:55:17 +0000114
115 GElf_Addr segment_align; /* Smallest granularity of segments. */
116
117 /* Binary search table in three parallel malloc'd arrays. */
118 size_t lookup_elts; /* Elements in use. */
119 size_t lookup_alloc; /* Elements allococated. */
120 GElf_Addr *lookup_addr; /* Start address of segment. */
121 Dwfl_Module **lookup_module; /* Module associated with segment, or null. */
122 int *lookup_segndx; /* User segment index, or -1. */
123
124 /* Cache from last dwfl_report_segment call. */
125 const void *lookup_tail_ident;
126 GElf_Off lookup_tail_vaddr;
127 GElf_Off lookup_tail_offset;
128 int lookup_tail_ndx;
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000129};
130
Roland McGrathd17fac72005-08-23 08:20:21 +0000131#define OFFLINE_REDZONE 0x10000
132
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000133struct dwfl_file
134{
135 char *name;
136 int fd;
Roland McGrath59ea7f32007-10-04 08:50:09 +0000137 bool valid; /* The build ID note has been matched. */
Roland McGrathe4c22ea2007-10-23 13:07:39 +0000138 bool relocated; /* Partial relocation of all sections done. */
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000139
140 Elf *elf;
141 GElf_Addr bias; /* Actual load address - p_vaddr. */
142};
143
144struct Dwfl_Module
145{
146 Dwfl *dwfl;
Roland McGrathd17fac72005-08-23 08:20:21 +0000147 struct Dwfl_Module *next; /* Link on Dwfl.modulelist. */
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000148
149 void *userdata;
150
151 char *name; /* Iterator name for this module. */
152 GElf_Addr low_addr, high_addr;
153
Roland McGrath59ea7f32007-10-04 08:50:09 +0000154 void *build_id_bits; /* malloc'd copy of build ID bits. */
155 GElf_Addr build_id_vaddr; /* Address where they reside, 0 if unknown. */
156 int build_id_len; /* -1 for prior failure, 0 if unset. */
157
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000158 struct dwfl_file main, debug;
159 Ebl *ebl;
Roland McGrathd17fac72005-08-23 08:20:21 +0000160 GElf_Half e_type; /* GElf_Ehdr.e_type cache. */
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000161 Dwfl_Error elferr; /* Previous failure to open main file. */
162
Roland McGrathd17fac72005-08-23 08:20:21 +0000163 struct dwfl_relocation *reloc_info; /* Relocatable sections. */
164
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000165 struct dwfl_file *symfile; /* Either main or debug. */
166 Elf_Data *symdata; /* Data in the ELF symbol table section. */
167 size_t syments; /* sh_size / sh_entsize of that section. */
Ulrich Dreppere1812e12006-07-12 07:46:03 +0000168 Elf_Data *symstrdata; /* Data for its string table. */
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000169 Elf_Data *symxndxdata; /* Data in the extended section index table. */
170 Dwfl_Error symerr; /* Previous failure to load symbols. */
171
172 Dwarf *dw; /* libdw handle for its debugging info. */
173 Dwfl_Error dwerr; /* Previous failure to load info. */
174
175 /* Known CU's in this module. */
176 struct dwfl_cu *first_cu, **cu;
177 unsigned int ncu;
178
179 void *lazy_cu_root; /* Table indexed by Dwarf_Off of CU. */
180 unsigned int lazycu; /* Possible users, deleted when none left. */
181
182 struct dwfl_arange *aranges; /* Mapping of addresses in module to CUs. */
183 unsigned int naranges;
184
Roland McGrathb4d6f0f2008-08-25 22:55:17 +0000185 int segment; /* Index of first segment table entry. */
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000186 bool gc; /* Mark/sweep flag. */
187};
188
189
190
191/* Information cached about each CU in Dwfl_Module.dw. */
192struct dwfl_cu
193{
194 /* This caches libdw information about the CU. It's also the
195 address passed back to users, so we take advantage of the
196 fact that it's placed first to cast back. */
197 Dwarf_Die die;
198
199 Dwfl_Module *mod; /* Pointer back to containing module. */
200
201 struct dwfl_cu *next; /* CU immediately following in the file. */
202
203 struct Dwfl_Lines *lines;
204};
205
206struct Dwfl_Lines
207{
208 struct dwfl_cu *cu;
209
210 /* This is what the opaque Dwfl_Line * pointers we pass to users are.
211 We need to recover pointers to our struct dwfl_cu and a record in
212 libdw's Dwarf_Line table. To minimize the memory used in addition
213 to libdw's Dwarf_Lines buffer, we just point to our own index in
214 this table, and have one pointer back to the CU. The indices here
215 match those in libdw's Dwarf_CU.lines->info table. */
216 struct Dwfl_Line
217 {
218 unsigned int idx; /* My index in the dwfl_cu.lines table. */
219 } idx[0];
220};
221
222static inline struct dwfl_cu *
Ulrich Dreppere1812e12006-07-12 07:46:03 +0000223dwfl_linecu_inline (const Dwfl_Line *line)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000224{
225 const struct Dwfl_Lines *lines = ((const void *) line
226 - offsetof (struct Dwfl_Lines,
227 idx[line->idx]));
228 return lines->cu;
229}
Ulrich Dreppere1812e12006-07-12 07:46:03 +0000230#define dwfl_linecu dwfl_linecu_inline
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000231
232/* This describes a contiguous address range that lies in a single CU.
233 We condense runs of Dwarf_Arange entries for the same CU into this. */
234struct dwfl_arange
235{
236 struct dwfl_cu *cu;
237 size_t arange; /* Index in Dwarf_Aranges. */
238};
239
240
241
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000242extern void __libdwfl_module_free (Dwfl_Module *mod) internal_function;
243
Roland McGratha605a3c2009-04-19 18:27:01 -0700244/* Find the main ELF file, update MOD->elferr and/or MOD->main.elf. */
245extern void __libdwfl_getelf (Dwfl_Module *mod) internal_function;
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000246
247/* Process relocations in debugging sections in an ET_REL file.
Roland McGrathe4c22ea2007-10-23 13:07:39 +0000248 FILE must be opened with ELF_C_READ_MMAP_PRIVATE or ELF_C_READ,
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000249 to make it possible to relocate the data in place (or ELF_C_RDWR or
250 ELF_C_RDWR_MMAP if you intend to modify the Elf file on disk). After
Roland McGrathe4c22ea2007-10-23 13:07:39 +0000251 this, dwarf_begin_elf on FILE will read the relocated data.
252
253 When DEBUG is false, apply partial relocation to all sections. */
254extern Dwfl_Error __libdwfl_relocate (Dwfl_Module *mod, Elf *file, bool debug)
255 internal_function;
256
257/* Process (simple) relocations in arbitrary section TSCN of an ET_REL file.
258 RELOCSCN is SHT_REL or SHT_RELA and TSCN is its sh_info target section. */
259extern Dwfl_Error __libdwfl_relocate_section (Dwfl_Module *mod, Elf *relocated,
260 Elf_Scn *relocscn, Elf_Scn *tscn,
261 bool partial)
Roland McGrathd2c59962005-08-10 22:13:57 +0000262 internal_function;
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000263
264/* Adjust *VALUE from section-relative to absolute.
265 MOD->dwfl->callbacks->section_address is called to determine the actual
266 address of a loaded section. */
Ulrich Drepperb597dfa2007-10-16 05:21:27 +0000267extern Dwfl_Error __libdwfl_relocate_value (Dwfl_Module *mod, Elf *elf,
268 size_t *shstrndx_cache,
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000269 Elf32_Word shndx,
270 GElf_Addr *value)
271 internal_function;
272
Roland McGrath994b4892005-12-05 22:46:21 +0000273
274/* Ensure that MOD->ebl is set up. */
275extern Dwfl_Error __libdwfl_module_getebl (Dwfl_Module *mod) internal_function;
276
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000277/* Iterate through all the CU's in the module. Start by passing a null
278 LASTCU, and then pass the last *CU returned. Success return with null
279 *CU no more CUs. */
280extern Dwfl_Error __libdwfl_nextcu (Dwfl_Module *mod, struct dwfl_cu *lastcu,
281 struct dwfl_cu **cu) internal_function;
282
283/* Find the CU by address. */
284extern Dwfl_Error __libdwfl_addrcu (Dwfl_Module *mod, Dwarf_Addr addr,
285 struct dwfl_cu **cu) internal_function;
286
287/* Ensure that CU->lines (and CU->cu->lines) is set up. */
288extern Dwfl_Error __libdwfl_cu_getsrclines (struct dwfl_cu *cu)
Roland McGrath59ea7f32007-10-04 08:50:09 +0000289 internal_function;
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000290
Roland McGrath59ea7f32007-10-04 08:50:09 +0000291/* Look in ELF for an NT_GNU_BUILD_ID note. If SET is true, store it
292 in MOD and return its length. If SET is false, instead compare it
293 to that stored in MOD and return 2 if they match, 1 if they do not.
294 Returns -1 for errors, 0 if no note is found. */
295extern int __libdwfl_find_build_id (Dwfl_Module *mod, bool set, Elf *elf)
296 internal_function;
297
298/* Open a main or debuginfo file by its build ID, returns the fd. */
299extern int __libdwfl_open_by_build_id (Dwfl_Module *mod, bool debug,
300 char **file_name) internal_function;
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000301
Ulrich Drepper18618fd2005-07-28 21:29:22 +0000302extern uint32_t __libdwfl_crc32 (uint32_t crc, unsigned char *buf, size_t len)
Roland McGrath59ea7f32007-10-04 08:50:09 +0000303 attribute_hidden;
Ulrich Drepper18618fd2005-07-28 21:29:22 +0000304extern int __libdwfl_crc32_file (int fd, uint32_t *resp) attribute_hidden;
305
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000306
Ulrich Drepperb597dfa2007-10-16 05:21:27 +0000307/* Meat of dwfl_report_elf, given elf_begin just called.
308 Consumes ELF on success, not on failure. */
309extern Dwfl_Module *__libdwfl_report_elf (Dwfl *dwfl, const char *name,
310 const char *file_name, int fd,
Roland McGrath5453abf2009-02-10 17:33:49 -0800311 Elf *elf, GElf_Addr base, bool sanity)
Ulrich Drepperb597dfa2007-10-16 05:21:27 +0000312 internal_function;
313
314/* Meat of dwfl_report_offline. */
315extern Dwfl_Module *__libdwfl_report_offline (Dwfl *dwfl, const char *name,
316 const char *file_name,
317 int fd, bool closefd,
318 int (*predicate) (const char *,
319 const char *))
320 internal_function;
321
Roland McGrathbca43152009-01-05 23:59:32 -0800322/* Decompression wrappers: decompress whole file into memory. */
323extern Dwfl_Error __libdw_gunzip (int fd, off64_t start_offset,
324 void *mapped, size_t mapped_size,
325 void **whole, size_t *whole_size)
326 internal_function;
327extern Dwfl_Error __libdw_bunzip2 (int fd, off64_t start_offset,
328 void *mapped, size_t mapped_size,
329 void **whole, size_t *whole_size)
330 internal_function;
331
332/* Open Elf handle on *FDP. This handles decompression and checks
333 elf_kind. Succeed only for ELF_K_ELF, or also ELF_K_AR if ARCHIVE_OK.
334 Returns DWFL_E_NOERROR and sets *ELFP on success, resets *FDP to -1 if
335 it's no longer used. Resets *FDP on failure too iff CLOSE_ON_FAIL. */
336extern Dwfl_Error __libdw_open_file (int *fdp, Elf **elfp,
337 bool close_on_fail, bool archive_ok)
338 internal_function;
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000339
Roland McGrathb4d6f0f2008-08-25 22:55:17 +0000340/* These are working nicely for --core, but are not ready to be
341 exported interfaces quite yet. */
342
343/* Type of callback function ...
344 */
345typedef bool Dwfl_Memory_Callback (Dwfl *dwfl, int segndx,
346 void **buffer, size_t *buffer_available,
347 GElf_Addr vaddr, size_t minread, void *arg);
348
349/* Type of callback function ...
350 */
351typedef bool Dwfl_Module_Callback (Dwfl_Module *mod, void **userdata,
352 const char *name, Dwarf_Addr base,
353 void **buffer, size_t *buffer_available,
354 GElf_Off cost, GElf_Off worthwhile,
355 GElf_Off whole, GElf_Off contiguous,
356 void *arg, Elf **elfp);
357
358/* ...
359 */
360extern int dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name,
361 Dwfl_Memory_Callback *memory_callback,
362 void *memory_callback_arg,
363 Dwfl_Module_Callback *read_eagerly,
364 void *read_eagerly_arg);
365
366/* Report a module for entry in the dynamic linker's struct link_map list.
367 For each link_map entry, if an existing module resides at its address,
368 this just modifies that module's name and suggested file name. If
369 no such module exists, this calls dwfl_report_elf on the l_name string.
370
371 If AUXV is not null, it points to AUXV_SIZE bytes of auxiliary vector
372 data as contained in an NT_AUXV note or read from a /proc/pid/auxv
373 file. When this is available, it guides the search. If AUXV is null
374 or the memory it points to is not accessible, then this search can
375 only find where to begin if the correct executable file was
376 previously reported and preloaded as with dwfl_report_elf.
377
378 Returns the number of modules found, or -1 for errors. */
379extern int dwfl_link_map_report (Dwfl *dwfl, const void *auxv, size_t auxv_size,
380 Dwfl_Memory_Callback *memory_callback,
381 void *memory_callback_arg);
382
383/* Examine an ET_CORE file and report modules based on its contents. */
384extern int dwfl_core_file_report (Dwfl *dwfl, Elf *elf, const GElf_Ehdr *ehdr);
385
386
Roland McGrathbca43152009-01-05 23:59:32 -0800387
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000388/* Avoid PLT entries. */
389INTDECL (dwfl_begin)
390INTDECL (dwfl_errmsg)
391INTDECL (dwfl_addrmodule)
Roland McGrathb4d6f0f2008-08-25 22:55:17 +0000392INTDECL (dwfl_addrsegment)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000393INTDECL (dwfl_addrdwarf)
394INTDECL (dwfl_addrdie)
Roland McGrathb4d6f0f2008-08-25 22:55:17 +0000395INTDECL (dwfl_core_file_report)
396INTDECL (dwfl_getmodules)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000397INTDECL (dwfl_module_addrdie)
Roland McGrathb4d6f0f2008-08-25 22:55:17 +0000398INTDECL (dwfl_module_address_section)
Ulrich Drepper6258e742007-03-13 06:22:40 +0000399INTDECL (dwfl_module_addrsym)
Roland McGrath59ea7f32007-10-04 08:50:09 +0000400INTDECL (dwfl_module_build_id)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000401INTDECL (dwfl_module_getdwarf)
402INTDECL (dwfl_module_getelf)
Ulrich Dreppere1812e12006-07-12 07:46:03 +0000403INTDECL (dwfl_module_getsym)
404INTDECL (dwfl_module_getsymtab)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000405INTDECL (dwfl_module_getsrc)
Roland McGrath59ea7f32007-10-04 08:50:09 +0000406INTDECL (dwfl_module_report_build_id)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000407INTDECL (dwfl_report_elf)
408INTDECL (dwfl_report_begin)
Ulrich Drepper6258e742007-03-13 06:22:40 +0000409INTDECL (dwfl_report_begin_add)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000410INTDECL (dwfl_report_module)
Roland McGrathb4d6f0f2008-08-25 22:55:17 +0000411INTDECL (dwfl_report_segment)
Roland McGrathd17fac72005-08-23 08:20:21 +0000412INTDECL (dwfl_report_offline)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000413INTDECL (dwfl_report_end)
Roland McGrath59ea7f32007-10-04 08:50:09 +0000414INTDECL (dwfl_build_id_find_elf)
415INTDECL (dwfl_build_id_find_debuginfo)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000416INTDECL (dwfl_standard_find_debuginfo)
Roland McGrathb4d6f0f2008-08-25 22:55:17 +0000417INTDECL (dwfl_link_map_report)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000418INTDECL (dwfl_linux_kernel_find_elf)
419INTDECL (dwfl_linux_kernel_module_section_address)
420INTDECL (dwfl_linux_proc_report)
Roland McGrath1656bc02005-12-23 01:49:50 +0000421INTDECL (dwfl_linux_proc_maps_report)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000422INTDECL (dwfl_linux_proc_find_elf)
423INTDECL (dwfl_linux_kernel_report_kernel)
424INTDECL (dwfl_linux_kernel_report_modules)
Roland McGrathd17fac72005-08-23 08:20:21 +0000425INTDECL (dwfl_linux_kernel_report_offline)
426INTDECL (dwfl_offline_section_address)
427INTDECL (dwfl_module_relocate_address)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000428
429/* Leading arguments standard to callbacks passed a Dwfl_Module. */
430#define MODCB_ARGS(mod) (mod), &(mod)->userdata, (mod)->name, (mod)->low_addr
431#define CBFAIL (errno ? DWFL_E (ERRNO, errno) : DWFL_E_CB);
432
433
Roland McGratha1cee072006-08-15 01:37:23 +0000434/* The default used by dwfl_standard_find_debuginfo. */
435#define DEFAULT_DEBUGINFO_PATH ":.debug:/usr/lib/debug"
436
437
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000438#endif /* libdwflP.h */