blob: 85519498d083a3a31183d612dd473140286dbb2b [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
244
245/* Process relocations in debugging sections in an ET_REL file.
Roland McGrathe4c22ea2007-10-23 13:07:39 +0000246 FILE must be opened with ELF_C_READ_MMAP_PRIVATE or ELF_C_READ,
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000247 to make it possible to relocate the data in place (or ELF_C_RDWR or
248 ELF_C_RDWR_MMAP if you intend to modify the Elf file on disk). After
Roland McGrathe4c22ea2007-10-23 13:07:39 +0000249 this, dwarf_begin_elf on FILE will read the relocated data.
250
251 When DEBUG is false, apply partial relocation to all sections. */
252extern Dwfl_Error __libdwfl_relocate (Dwfl_Module *mod, Elf *file, bool debug)
253 internal_function;
254
255/* Process (simple) relocations in arbitrary section TSCN of an ET_REL file.
256 RELOCSCN is SHT_REL or SHT_RELA and TSCN is its sh_info target section. */
257extern Dwfl_Error __libdwfl_relocate_section (Dwfl_Module *mod, Elf *relocated,
258 Elf_Scn *relocscn, Elf_Scn *tscn,
259 bool partial)
Roland McGrathd2c59962005-08-10 22:13:57 +0000260 internal_function;
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000261
262/* Adjust *VALUE from section-relative to absolute.
263 MOD->dwfl->callbacks->section_address is called to determine the actual
264 address of a loaded section. */
Ulrich Drepperb597dfa2007-10-16 05:21:27 +0000265extern Dwfl_Error __libdwfl_relocate_value (Dwfl_Module *mod, Elf *elf,
266 size_t *shstrndx_cache,
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000267 Elf32_Word shndx,
268 GElf_Addr *value)
269 internal_function;
270
Roland McGrath994b4892005-12-05 22:46:21 +0000271
272/* Ensure that MOD->ebl is set up. */
273extern Dwfl_Error __libdwfl_module_getebl (Dwfl_Module *mod) internal_function;
274
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000275/* Iterate through all the CU's in the module. Start by passing a null
276 LASTCU, and then pass the last *CU returned. Success return with null
277 *CU no more CUs. */
278extern Dwfl_Error __libdwfl_nextcu (Dwfl_Module *mod, struct dwfl_cu *lastcu,
279 struct dwfl_cu **cu) internal_function;
280
281/* Find the CU by address. */
282extern Dwfl_Error __libdwfl_addrcu (Dwfl_Module *mod, Dwarf_Addr addr,
283 struct dwfl_cu **cu) internal_function;
284
285/* Ensure that CU->lines (and CU->cu->lines) is set up. */
286extern Dwfl_Error __libdwfl_cu_getsrclines (struct dwfl_cu *cu)
Roland McGrath59ea7f32007-10-04 08:50:09 +0000287 internal_function;
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000288
Roland McGrath59ea7f32007-10-04 08:50:09 +0000289/* Look in ELF for an NT_GNU_BUILD_ID note. If SET is true, store it
290 in MOD and return its length. If SET is false, instead compare it
291 to that stored in MOD and return 2 if they match, 1 if they do not.
292 Returns -1 for errors, 0 if no note is found. */
293extern int __libdwfl_find_build_id (Dwfl_Module *mod, bool set, Elf *elf)
294 internal_function;
295
296/* Open a main or debuginfo file by its build ID, returns the fd. */
297extern int __libdwfl_open_by_build_id (Dwfl_Module *mod, bool debug,
298 char **file_name) internal_function;
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000299
Ulrich Drepper18618fd2005-07-28 21:29:22 +0000300extern uint32_t __libdwfl_crc32 (uint32_t crc, unsigned char *buf, size_t len)
Roland McGrath59ea7f32007-10-04 08:50:09 +0000301 attribute_hidden;
Ulrich Drepper18618fd2005-07-28 21:29:22 +0000302extern int __libdwfl_crc32_file (int fd, uint32_t *resp) attribute_hidden;
303
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000304
Ulrich Drepperb597dfa2007-10-16 05:21:27 +0000305/* Meat of dwfl_report_elf, given elf_begin just called.
306 Consumes ELF on success, not on failure. */
307extern Dwfl_Module *__libdwfl_report_elf (Dwfl *dwfl, const char *name,
308 const char *file_name, int fd,
309 Elf *elf, GElf_Addr base)
310 internal_function;
311
312/* Meat of dwfl_report_offline. */
313extern Dwfl_Module *__libdwfl_report_offline (Dwfl *dwfl, const char *name,
314 const char *file_name,
315 int fd, bool closefd,
316 int (*predicate) (const char *,
317 const char *))
318 internal_function;
319
Roland McGrathbca43152009-01-05 23:59:32 -0800320/* Decompression wrappers: decompress whole file into memory. */
321extern Dwfl_Error __libdw_gunzip (int fd, off64_t start_offset,
322 void *mapped, size_t mapped_size,
323 void **whole, size_t *whole_size)
324 internal_function;
325extern Dwfl_Error __libdw_bunzip2 (int fd, off64_t start_offset,
326 void *mapped, size_t mapped_size,
327 void **whole, size_t *whole_size)
328 internal_function;
329
330/* Open Elf handle on *FDP. This handles decompression and checks
331 elf_kind. Succeed only for ELF_K_ELF, or also ELF_K_AR if ARCHIVE_OK.
332 Returns DWFL_E_NOERROR and sets *ELFP on success, resets *FDP to -1 if
333 it's no longer used. Resets *FDP on failure too iff CLOSE_ON_FAIL. */
334extern Dwfl_Error __libdw_open_file (int *fdp, Elf **elfp,
335 bool close_on_fail, bool archive_ok)
336 internal_function;
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000337
Roland McGrathb4d6f0f2008-08-25 22:55:17 +0000338/* These are working nicely for --core, but are not ready to be
339 exported interfaces quite yet. */
340
341/* Type of callback function ...
342 */
343typedef bool Dwfl_Memory_Callback (Dwfl *dwfl, int segndx,
344 void **buffer, size_t *buffer_available,
345 GElf_Addr vaddr, size_t minread, void *arg);
346
347/* Type of callback function ...
348 */
349typedef bool Dwfl_Module_Callback (Dwfl_Module *mod, void **userdata,
350 const char *name, Dwarf_Addr base,
351 void **buffer, size_t *buffer_available,
352 GElf_Off cost, GElf_Off worthwhile,
353 GElf_Off whole, GElf_Off contiguous,
354 void *arg, Elf **elfp);
355
356/* ...
357 */
358extern int dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name,
359 Dwfl_Memory_Callback *memory_callback,
360 void *memory_callback_arg,
361 Dwfl_Module_Callback *read_eagerly,
362 void *read_eagerly_arg);
363
364/* Report a module for entry in the dynamic linker's struct link_map list.
365 For each link_map entry, if an existing module resides at its address,
366 this just modifies that module's name and suggested file name. If
367 no such module exists, this calls dwfl_report_elf on the l_name string.
368
369 If AUXV is not null, it points to AUXV_SIZE bytes of auxiliary vector
370 data as contained in an NT_AUXV note or read from a /proc/pid/auxv
371 file. When this is available, it guides the search. If AUXV is null
372 or the memory it points to is not accessible, then this search can
373 only find where to begin if the correct executable file was
374 previously reported and preloaded as with dwfl_report_elf.
375
376 Returns the number of modules found, or -1 for errors. */
377extern int dwfl_link_map_report (Dwfl *dwfl, const void *auxv, size_t auxv_size,
378 Dwfl_Memory_Callback *memory_callback,
379 void *memory_callback_arg);
380
381/* Examine an ET_CORE file and report modules based on its contents. */
382extern int dwfl_core_file_report (Dwfl *dwfl, Elf *elf, const GElf_Ehdr *ehdr);
383
384
Roland McGrathbca43152009-01-05 23:59:32 -0800385
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000386/* Avoid PLT entries. */
387INTDECL (dwfl_begin)
388INTDECL (dwfl_errmsg)
389INTDECL (dwfl_addrmodule)
Roland McGrathb4d6f0f2008-08-25 22:55:17 +0000390INTDECL (dwfl_addrsegment)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000391INTDECL (dwfl_addrdwarf)
392INTDECL (dwfl_addrdie)
Roland McGrathb4d6f0f2008-08-25 22:55:17 +0000393INTDECL (dwfl_core_file_report)
394INTDECL (dwfl_getmodules)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000395INTDECL (dwfl_module_addrdie)
Roland McGrathb4d6f0f2008-08-25 22:55:17 +0000396INTDECL (dwfl_module_address_section)
Ulrich Drepper6258e742007-03-13 06:22:40 +0000397INTDECL (dwfl_module_addrsym)
Roland McGrath59ea7f32007-10-04 08:50:09 +0000398INTDECL (dwfl_module_build_id)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000399INTDECL (dwfl_module_getdwarf)
400INTDECL (dwfl_module_getelf)
Ulrich Dreppere1812e12006-07-12 07:46:03 +0000401INTDECL (dwfl_module_getsym)
402INTDECL (dwfl_module_getsymtab)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000403INTDECL (dwfl_module_getsrc)
Roland McGrath59ea7f32007-10-04 08:50:09 +0000404INTDECL (dwfl_module_report_build_id)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000405INTDECL (dwfl_report_elf)
406INTDECL (dwfl_report_begin)
Ulrich Drepper6258e742007-03-13 06:22:40 +0000407INTDECL (dwfl_report_begin_add)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000408INTDECL (dwfl_report_module)
Roland McGrathb4d6f0f2008-08-25 22:55:17 +0000409INTDECL (dwfl_report_segment)
Roland McGrathd17fac72005-08-23 08:20:21 +0000410INTDECL (dwfl_report_offline)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000411INTDECL (dwfl_report_end)
Roland McGrath59ea7f32007-10-04 08:50:09 +0000412INTDECL (dwfl_build_id_find_elf)
413INTDECL (dwfl_build_id_find_debuginfo)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000414INTDECL (dwfl_standard_find_debuginfo)
Roland McGrathb4d6f0f2008-08-25 22:55:17 +0000415INTDECL (dwfl_link_map_report)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000416INTDECL (dwfl_linux_kernel_find_elf)
417INTDECL (dwfl_linux_kernel_module_section_address)
418INTDECL (dwfl_linux_proc_report)
Roland McGrath1656bc02005-12-23 01:49:50 +0000419INTDECL (dwfl_linux_proc_maps_report)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000420INTDECL (dwfl_linux_proc_find_elf)
421INTDECL (dwfl_linux_kernel_report_kernel)
422INTDECL (dwfl_linux_kernel_report_modules)
Roland McGrathd17fac72005-08-23 08:20:21 +0000423INTDECL (dwfl_linux_kernel_report_offline)
424INTDECL (dwfl_offline_section_address)
425INTDECL (dwfl_module_relocate_address)
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000426
427/* Leading arguments standard to callbacks passed a Dwfl_Module. */
428#define MODCB_ARGS(mod) (mod), &(mod)->userdata, (mod)->name, (mod)->low_addr
429#define CBFAIL (errno ? DWFL_E (ERRNO, errno) : DWFL_E_CB);
430
431
Roland McGratha1cee072006-08-15 01:37:23 +0000432/* The default used by dwfl_standard_find_debuginfo. */
433#define DEFAULT_DEBUGINFO_PATH ":.debug:/usr/lib/debug"
434
435
Ulrich Drepperb08d5a82005-07-26 05:00:05 +0000436#endif /* libdwflP.h */