Branch data Line data Source code
1 : : /* Internal definitions for libdwfl.
2 : : Copyright (C) 2005-2012 Red Hat, Inc.
3 : : This file is part of elfutils.
4 : :
5 : : This file is free software; you can redistribute it and/or modify
6 : : it under the terms of either
7 : :
8 : : * the GNU Lesser General Public License as published by the Free
9 : : Software Foundation; either version 3 of the License, or (at
10 : : your option) any later version
11 : :
12 : : or
13 : :
14 : : * the GNU General Public License as published by the Free
15 : : Software Foundation; either version 2 of the License, or (at
16 : : your option) any later version
17 : :
18 : : or both in parallel, as here.
19 : :
20 : : elfutils is distributed in the hope that it will be useful, but
21 : : WITHOUT ANY WARRANTY; without even the implied warranty of
22 : : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 : : General Public License for more details.
24 : :
25 : : You should have received copies of the GNU General Public License and
26 : : the GNU Lesser General Public License along with this program. If
27 : : not, see <http://www.gnu.org/licenses/>. */
28 : :
29 : : #ifndef _LIBDWFLP_H
30 : : #define _LIBDWFLP_H 1
31 : :
32 : : #ifndef PACKAGE_NAME
33 : : # include <config.h>
34 : : #endif
35 : : #include <libdwfl.h>
36 : : #include <libebl.h>
37 : : #include <assert.h>
38 : : #include <errno.h>
39 : : #include <stdbool.h>
40 : : #include <stdlib.h>
41 : : #include <string.h>
42 : :
43 : : #include "../libdw/libdwP.h" /* We need its INTDECLs. */
44 : :
45 : : /* gettext helper macros. */
46 : : #define _(Str) dgettext ("elfutils", Str)
47 : :
48 : : #define DWFL_ERRORS \
49 : : DWFL_ERROR (NOERROR, N_("no error")) \
50 : : DWFL_ERROR (UNKNOWN_ERROR, N_("unknown error")) \
51 : : DWFL_ERROR (NOMEM, N_("out of memory")) \
52 : : DWFL_ERROR (ERRNO, N_("See errno")) \
53 : : DWFL_ERROR (LIBELF, N_("See elf_errno")) \
54 : : DWFL_ERROR (LIBDW, N_("See dwarf_errno")) \
55 : : DWFL_ERROR (LIBEBL, N_("See ebl_errno (XXX missing)")) \
56 : : DWFL_ERROR (ZLIB, N_("gzip decompression failed")) \
57 : : DWFL_ERROR (BZLIB, N_("bzip2 decompression failed")) \
58 : : DWFL_ERROR (LZMA, N_("LZMA decompression failed")) \
59 : : DWFL_ERROR (UNKNOWN_MACHINE, N_("no support library found for machine")) \
60 : : DWFL_ERROR (NOREL, N_("Callbacks missing for ET_REL file")) \
61 : : DWFL_ERROR (BADRELTYPE, N_("Unsupported relocation type")) \
62 : : DWFL_ERROR (BADRELOFF, N_("r_offset is bogus")) \
63 : : DWFL_ERROR (BADSTROFF, N_("offset out of range")) \
64 : : DWFL_ERROR (RELUNDEF, N_("relocation refers to undefined symbol")) \
65 : : DWFL_ERROR (CB, N_("Callback returned failure")) \
66 : : DWFL_ERROR (NO_DWARF, N_("No DWARF information found")) \
67 : : DWFL_ERROR (NO_SYMTAB, N_("No symbol table found")) \
68 : : DWFL_ERROR (NO_PHDR, N_("No ELF program headers")) \
69 : : DWFL_ERROR (OVERLAP, N_("address range overlaps an existing module")) \
70 : : DWFL_ERROR (ADDR_OUTOFRANGE, N_("address out of range")) \
71 : : DWFL_ERROR (NO_MATCH, N_("no matching address range")) \
72 : : DWFL_ERROR (TRUNCATED, N_("image truncated")) \
73 : : DWFL_ERROR (ALREADY_ELF, N_("ELF file opened")) \
74 : : DWFL_ERROR (BADELF, N_("not a valid ELF file")) \
75 : : DWFL_ERROR (WEIRD_TYPE, N_("cannot handle DWARF type description")) \
76 : : DWFL_ERROR (WRONG_ID_ELF, N_("ELF file does not match build ID")) \
77 : : DWFL_ERROR (BAD_PRELINK, N_("corrupt .gnu.prelink_undo section data"))
78 : :
79 : : #define DWFL_ERROR(name, text) DWFL_E_##name,
80 : : typedef enum { DWFL_ERRORS DWFL_E_NUM } Dwfl_Error;
81 : : #undef DWFL_ERROR
82 : :
83 : : #define OTHER_ERROR(name) ((unsigned int) DWFL_E_##name << 16)
84 : : #define DWFL_E(name, errno) (OTHER_ERROR (name) | (errno))
85 : :
86 : : extern int __libdwfl_canon_error (Dwfl_Error) internal_function;
87 : : extern void __libdwfl_seterrno (Dwfl_Error) internal_function;
88 : :
89 : : struct Dwfl
90 : : {
91 : : const Dwfl_Callbacks *callbacks;
92 : :
93 : : Dwfl_Module *modulelist; /* List in order used by full traversals. */
94 : :
95 : : GElf_Addr offline_next_address;
96 : :
97 : : GElf_Addr segment_align; /* Smallest granularity of segments. */
98 : :
99 : : /* Binary search table in three parallel malloc'd arrays. */
100 : : size_t lookup_elts; /* Elements in use. */
101 : : size_t lookup_alloc; /* Elements allococated. */
102 : : GElf_Addr *lookup_addr; /* Start address of segment. */
103 : : Dwfl_Module **lookup_module; /* Module associated with segment, or null. */
104 : : int *lookup_segndx; /* User segment index, or -1. */
105 : :
106 : : /* Cache from last dwfl_report_segment call. */
107 : : const void *lookup_tail_ident;
108 : : GElf_Off lookup_tail_vaddr;
109 : : GElf_Off lookup_tail_offset;
110 : : int lookup_tail_ndx;
111 : :
112 : : char *executable_for_core; /* --executable if --core was specified. */
113 : : };
114 : :
115 : : #define OFFLINE_REDZONE 0x10000
116 : :
117 : : struct dwfl_file
118 : : {
119 : : char *name;
120 : : int fd;
121 : : bool valid; /* The build ID note has been matched. */
122 : : bool relocated; /* Partial relocation of all sections done. */
123 : :
124 : : Elf *elf;
125 : :
126 : : /* This is the lowest p_vaddr in this ELF file, aligned to p_align.
127 : : For a file without phdrs, this is zero. */
128 : : GElf_Addr vaddr;
129 : :
130 : : /* This is an address chosen for synchronization between the main file
131 : : and the debug file. See dwfl_module_getdwarf.c for how it's chosen. */
132 : : GElf_Addr address_sync;
133 : : };
134 : :
135 : : struct Dwfl_Module
136 : : {
137 : : Dwfl *dwfl;
138 : : struct Dwfl_Module *next; /* Link on Dwfl.modulelist. */
139 : :
140 : : void *userdata;
141 : :
142 : : char *name; /* Iterator name for this module. */
143 : : GElf_Addr low_addr, high_addr;
144 : :
145 : : struct dwfl_file main, debug, aux_sym;
146 : : GElf_Addr main_bias;
147 : : Ebl *ebl;
148 : : GElf_Half e_type; /* GElf_Ehdr.e_type cache. */
149 : : Dwfl_Error elferr; /* Previous failure to open main file. */
150 : :
151 : : struct dwfl_relocation *reloc_info; /* Relocatable sections. */
152 : :
153 : : struct dwfl_file *symfile; /* Either main or debug. */
154 : : Elf_Data *symdata; /* Data in the ELF symbol table section. */
155 : : Elf_Data *aux_symdata; /* Data in the auxiliary ELF symbol table. */
156 : : size_t syments; /* sh_size / sh_entsize of that section. */
157 : : size_t aux_syments; /* sh_size / sh_entsize of aux_sym section. */
158 : : int first_global; /* Index of first global symbol of table. */
159 : : int aux_first_global; /* Index of first global of aux_sym table. */
160 : : Elf_Data *symstrdata; /* Data for its string table. */
161 : : Elf_Data *aux_symstrdata; /* Data for aux_sym string table. */
162 : : Elf_Data *symxndxdata; /* Data in the extended section index table. */
163 : : Elf_Data *aux_symxndxdata; /* Data in the extended auxiliary table. */
164 : :
165 : : Dwarf *dw; /* libdw handle for its debugging info. */
166 : :
167 : : Dwfl_Error symerr; /* Previous failure to load symbols. */
168 : : Dwfl_Error dwerr; /* Previous failure to load DWARF. */
169 : :
170 : : /* Known CU's in this module. */
171 : : struct dwfl_cu *first_cu, **cu;
172 : :
173 : : void *lazy_cu_root; /* Table indexed by Dwarf_Off of CU. */
174 : :
175 : : struct dwfl_arange *aranges; /* Mapping of addresses in module to CUs. */
176 : :
177 : : void *build_id_bits; /* malloc'd copy of build ID bits. */
178 : : GElf_Addr build_id_vaddr; /* Address where they reside, 0 if unknown. */
179 : : int build_id_len; /* -1 for prior failure, 0 if unset. */
180 : :
181 : : unsigned int ncu;
182 : : unsigned int lazycu; /* Possible users, deleted when none left. */
183 : : unsigned int naranges;
184 : :
185 : : Dwarf_CFI *dwarf_cfi; /* Cached DWARF CFI for this module. */
186 : : Dwarf_CFI *eh_cfi; /* Cached EH CFI for this module. */
187 : :
188 : : int segment; /* Index of first segment table entry. */
189 : : bool gc; /* Mark/sweep flag. */
190 : : };
191 : :
192 : :
193 : :
194 : : /* Information cached about each CU in Dwfl_Module.dw. */
195 : : struct dwfl_cu
196 : : {
197 : : /* This caches libdw information about the CU. It's also the
198 : : address passed back to users, so we take advantage of the
199 : : fact that it's placed first to cast back. */
200 : : Dwarf_Die die;
201 : :
202 : : Dwfl_Module *mod; /* Pointer back to containing module. */
203 : :
204 : : struct dwfl_cu *next; /* CU immediately following in the file. */
205 : :
206 : : struct Dwfl_Lines *lines;
207 : : };
208 : :
209 : : struct Dwfl_Lines
210 : : {
211 : : struct dwfl_cu *cu;
212 : :
213 : : /* This is what the opaque Dwfl_Line * pointers we pass to users are.
214 : : We need to recover pointers to our struct dwfl_cu and a record in
215 : : libdw's Dwarf_Line table. To minimize the memory used in addition
216 : : to libdw's Dwarf_Lines buffer, we just point to our own index in
217 : : this table, and have one pointer back to the CU. The indices here
218 : : match those in libdw's Dwarf_CU.lines->info table. */
219 : : struct Dwfl_Line
220 : : {
221 : : unsigned int idx; /* My index in the dwfl_cu.lines table. */
222 : : } idx[0];
223 : : };
224 : :
225 : : static inline struct dwfl_cu *
226 : : dwfl_linecu_inline (const Dwfl_Line *line)
227 : : {
228 : 1949 : const struct Dwfl_Lines *lines = ((const void *) line
229 : 1309 : - offsetof (struct Dwfl_Lines,
230 : : idx[line->idx]));
231 : 1309 : return lines->cu;
232 : : }
233 : : #define dwfl_linecu dwfl_linecu_inline
234 : :
235 : : static inline GElf_Addr
236 : : dwfl_adjusted_address (Dwfl_Module *mod, GElf_Addr addr)
237 : : {
238 : 378444314 : return addr + mod->main_bias;
239 : : }
240 : :
241 : : static inline GElf_Addr
242 : : dwfl_deadjust_address (Dwfl_Module *mod, GElf_Addr addr)
243 : : {
244 : 79185 : return addr - mod->main_bias;
245 : : }
246 : :
247 : : static inline Dwarf_Addr
248 : : dwfl_adjusted_dwarf_addr (Dwfl_Module *mod, Dwarf_Addr addr)
249 : : {
250 : 21560 : return dwfl_adjusted_address (mod, (addr
251 : 10780 : - mod->debug.address_sync
252 : 10780 : + mod->main.address_sync));
253 : : }
254 : :
255 : : static inline Dwarf_Addr
256 : : dwfl_deadjust_dwarf_addr (Dwfl_Module *mod, Dwarf_Addr addr)
257 : : {
258 : 160 : return (dwfl_deadjust_address (mod, addr)
259 : 80 : - mod->main.address_sync
260 : 80 : + mod->debug.address_sync);
261 : : }
262 : :
263 : : static inline Dwarf_Addr
264 : : dwfl_adjusted_aux_sym_addr (Dwfl_Module *mod, Dwarf_Addr addr)
265 : : {
266 : 514 : return dwfl_adjusted_address (mod, (addr
267 : 257 : - mod->aux_sym.address_sync
268 : 257 : + mod->main.address_sync));
269 : : }
270 : :
271 : : static inline Dwarf_Addr
272 : : dwfl_deadjust_aux_sym_addr (Dwfl_Module *mod, Dwarf_Addr addr)
273 : : {
274 : 18 : return (dwfl_deadjust_address (mod, addr)
275 : 9 : - mod->main.address_sync
276 : 9 : + mod->aux_sym.address_sync);
277 : : }
278 : :
279 : : static inline GElf_Addr
280 : 377798784 : dwfl_adjusted_st_value (Dwfl_Module *mod, struct dwfl_file *symfile,
281 : : GElf_Addr addr)
282 : : {
283 [ + + ]: 377798784 : if (symfile == &mod->main)
284 : 377797325 : return dwfl_adjusted_address (mod, addr);
285 [ + + ]: 1459 : if (symfile == &mod->debug)
286 : 1202 : return dwfl_adjusted_dwarf_addr (mod, addr);
287 : 377798784 : return dwfl_adjusted_aux_sym_addr (mod, addr);
288 : : }
289 : :
290 : : static inline GElf_Addr
291 : 79139 : dwfl_deadjust_st_value (Dwfl_Module *mod, struct dwfl_file *symfile,
292 : : GElf_Addr addr)
293 : : {
294 [ + + ]: 79139 : if (symfile == &mod->main)
295 : 79096 : return dwfl_deadjust_address (mod, addr);
296 [ + + ]: 43 : if (symfile == &mod->debug)
297 : 34 : return dwfl_deadjust_dwarf_addr (mod, addr);
298 : 79139 : return dwfl_deadjust_aux_sym_addr (mod, addr);
299 : : }
300 : :
301 : : /* This describes a contiguous address range that lies in a single CU.
302 : : We condense runs of Dwarf_Arange entries for the same CU into this. */
303 : : struct dwfl_arange
304 : : {
305 : : struct dwfl_cu *cu;
306 : : size_t arange; /* Index in Dwarf_Aranges. */
307 : : };
308 : :
309 : :
310 : :
311 : : extern void __libdwfl_module_free (Dwfl_Module *mod) internal_function;
312 : :
313 : : /* Find the main ELF file, update MOD->elferr and/or MOD->main.elf. */
314 : : extern void __libdwfl_getelf (Dwfl_Module *mod) internal_function;
315 : :
316 : : /* Process relocations in debugging sections in an ET_REL file.
317 : : FILE must be opened with ELF_C_READ_MMAP_PRIVATE or ELF_C_READ,
318 : : to make it possible to relocate the data in place (or ELF_C_RDWR or
319 : : ELF_C_RDWR_MMAP if you intend to modify the Elf file on disk). After
320 : : this, dwarf_begin_elf on FILE will read the relocated data.
321 : :
322 : : When DEBUG is false, apply partial relocation to all sections. */
323 : : extern Dwfl_Error __libdwfl_relocate (Dwfl_Module *mod, Elf *file, bool debug)
324 : : internal_function;
325 : :
326 : : /* Process (simple) relocations in arbitrary section TSCN of an ET_REL file.
327 : : RELOCSCN is SHT_REL or SHT_RELA and TSCN is its sh_info target section. */
328 : : extern Dwfl_Error __libdwfl_relocate_section (Dwfl_Module *mod, Elf *relocated,
329 : : Elf_Scn *relocscn, Elf_Scn *tscn,
330 : : bool partial)
331 : : internal_function;
332 : :
333 : : /* Adjust *VALUE from section-relative to absolute.
334 : : MOD->dwfl->callbacks->section_address is called to determine the actual
335 : : address of a loaded section. */
336 : : extern Dwfl_Error __libdwfl_relocate_value (Dwfl_Module *mod, Elf *elf,
337 : : size_t *shstrndx_cache,
338 : : Elf32_Word shndx,
339 : : GElf_Addr *value)
340 : : internal_function;
341 : :
342 : :
343 : : /* Ensure that MOD->ebl is set up. */
344 : : extern Dwfl_Error __libdwfl_module_getebl (Dwfl_Module *mod) internal_function;
345 : :
346 : : /* Install a new Dwarf_CFI in *SLOT (MOD->eh_cfi or MOD->dwarf_cfi). */
347 : : extern Dwarf_CFI *__libdwfl_set_cfi (Dwfl_Module *mod, Dwarf_CFI **slot,
348 : : Dwarf_CFI *cfi)
349 : : internal_function;
350 : :
351 : : /* Iterate through all the CU's in the module. Start by passing a null
352 : : LASTCU, and then pass the last *CU returned. Success return with null
353 : : *CU no more CUs. */
354 : : extern Dwfl_Error __libdwfl_nextcu (Dwfl_Module *mod, struct dwfl_cu *lastcu,
355 : : struct dwfl_cu **cu) internal_function;
356 : :
357 : : /* Find the CU by address. */
358 : : extern Dwfl_Error __libdwfl_addrcu (Dwfl_Module *mod, Dwarf_Addr addr,
359 : : struct dwfl_cu **cu) internal_function;
360 : :
361 : : /* Ensure that CU->lines (and CU->cu->lines) is set up. */
362 : : extern Dwfl_Error __libdwfl_cu_getsrclines (struct dwfl_cu *cu)
363 : : internal_function;
364 : :
365 : : /* Look in ELF for an NT_GNU_BUILD_ID note. If SET is true, store it
366 : : in MOD and return its length. If SET is false, instead compare it
367 : : to that stored in MOD and return 2 if they match, 1 if they do not.
368 : : Returns -1 for errors, 0 if no note is found. */
369 : : extern int __libdwfl_find_build_id (Dwfl_Module *mod, bool set, Elf *elf)
370 : : internal_function;
371 : :
372 : : /* Open a main or debuginfo file by its build ID, returns the fd. */
373 : : extern int __libdwfl_open_by_build_id (Dwfl_Module *mod, bool debug,
374 : : char **file_name) internal_function;
375 : :
376 : : extern uint32_t __libdwfl_crc32 (uint32_t crc, unsigned char *buf, size_t len)
377 : : attribute_hidden;
378 : : extern int __libdwfl_crc32_file (int fd, uint32_t *resp) attribute_hidden;
379 : :
380 : :
381 : : /* Meat of dwfl_report_elf, given elf_begin just called.
382 : : Consumes ELF on success, not on failure. */
383 : : extern Dwfl_Module *__libdwfl_report_elf (Dwfl *dwfl, const char *name,
384 : : const char *file_name, int fd,
385 : : Elf *elf, GElf_Addr base, bool sanity)
386 : : internal_function;
387 : :
388 : : /* Meat of dwfl_report_offline. */
389 : : extern Dwfl_Module *__libdwfl_report_offline (Dwfl *dwfl, const char *name,
390 : : const char *file_name,
391 : : int fd, bool closefd,
392 : : int (*predicate) (const char *,
393 : : const char *))
394 : : internal_function;
395 : :
396 : : /* Decompression wrappers: decompress whole file into memory. */
397 : : extern Dwfl_Error __libdw_gunzip (int fd, off64_t start_offset,
398 : : void *mapped, size_t mapped_size,
399 : : void **whole, size_t *whole_size)
400 : : internal_function;
401 : : extern Dwfl_Error __libdw_bunzip2 (int fd, off64_t start_offset,
402 : : void *mapped, size_t mapped_size,
403 : : void **whole, size_t *whole_size)
404 : : internal_function;
405 : : extern Dwfl_Error __libdw_unlzma (int fd, off64_t start_offset,
406 : : void *mapped, size_t mapped_size,
407 : : void **whole, size_t *whole_size)
408 : : internal_function;
409 : :
410 : : /* Skip the image header before a file image: updates *START_OFFSET. */
411 : : extern Dwfl_Error __libdw_image_header (int fd, off64_t *start_offset,
412 : : void *mapped, size_t mapped_size)
413 : : internal_function;
414 : :
415 : : /* Open Elf handle on *FDP. This handles decompression and checks
416 : : elf_kind. Succeed only for ELF_K_ELF, or also ELF_K_AR if ARCHIVE_OK.
417 : : Returns DWFL_E_NOERROR and sets *ELFP on success, resets *FDP to -1 if
418 : : it's no longer used. Resets *FDP on failure too iff CLOSE_ON_FAIL. */
419 : : extern Dwfl_Error __libdw_open_file (int *fdp, Elf **elfp,
420 : : bool close_on_fail, bool archive_ok)
421 : : internal_function;
422 : :
423 : : /* These are working nicely for --core, but are not ready to be
424 : : exported interfaces quite yet. */
425 : :
426 : : /* Type of callback function ...
427 : : */
428 : : typedef bool Dwfl_Memory_Callback (Dwfl *dwfl, int segndx,
429 : : void **buffer, size_t *buffer_available,
430 : : GElf_Addr vaddr, size_t minread, void *arg);
431 : :
432 : : /* Type of callback function ...
433 : : */
434 : : typedef bool Dwfl_Module_Callback (Dwfl_Module *mod, void **userdata,
435 : : const char *name, Dwarf_Addr base,
436 : : void **buffer, size_t *buffer_available,
437 : : GElf_Off cost, GElf_Off worthwhile,
438 : : GElf_Off whole, GElf_Off contiguous,
439 : : void *arg, Elf **elfp);
440 : :
441 : : /* ...
442 : : */
443 : : extern int dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name,
444 : : Dwfl_Memory_Callback *memory_callback,
445 : : void *memory_callback_arg,
446 : : Dwfl_Module_Callback *read_eagerly,
447 : : void *read_eagerly_arg);
448 : :
449 : : /* Report a module for entry in the dynamic linker's struct link_map list.
450 : : For each link_map entry, if an existing module resides at its address,
451 : : this just modifies that module's name and suggested file name. If
452 : : no such module exists, this calls dwfl_report_elf on the l_name string.
453 : :
454 : : If AUXV is not null, it points to AUXV_SIZE bytes of auxiliary vector
455 : : data as contained in an NT_AUXV note or read from a /proc/pid/auxv
456 : : file. When this is available, it guides the search. If AUXV is null
457 : : or the memory it points to is not accessible, then this search can
458 : : only find where to begin if the correct executable file was
459 : : previously reported and preloaded as with dwfl_report_elf.
460 : :
461 : : Returns the number of modules found, or -1 for errors. */
462 : : extern int dwfl_link_map_report (Dwfl *dwfl, const void *auxv, size_t auxv_size,
463 : : Dwfl_Memory_Callback *memory_callback,
464 : : void *memory_callback_arg);
465 : :
466 : :
467 : : /* Avoid PLT entries. */
468 : : INTDECL (dwfl_begin)
469 : : INTDECL (dwfl_errmsg)
470 : : INTDECL (dwfl_errno)
471 : : INTDECL (dwfl_addrmodule)
472 : : INTDECL (dwfl_addrsegment)
473 : : INTDECL (dwfl_addrdwarf)
474 : : INTDECL (dwfl_addrdie)
475 : : INTDECL (dwfl_core_file_report)
476 : : INTDECL (dwfl_getmodules)
477 : : INTDECL (dwfl_module_addrdie)
478 : : INTDECL (dwfl_module_address_section)
479 : : INTDECL (dwfl_module_addrsym)
480 : : INTDECL (dwfl_module_build_id)
481 : : INTDECL (dwfl_module_getdwarf)
482 : : INTDECL (dwfl_module_getelf)
483 : : INTDECL (dwfl_module_getsym)
484 : : INTDECL (dwfl_module_getsymtab)
485 : : INTDECL (dwfl_module_getsrc)
486 : : INTDECL (dwfl_module_report_build_id)
487 : : INTDECL (dwfl_report_elf)
488 : : INTDECL (dwfl_report_begin)
489 : : INTDECL (dwfl_report_begin_add)
490 : : INTDECL (dwfl_report_module)
491 : : INTDECL (dwfl_report_segment)
492 : : INTDECL (dwfl_report_offline)
493 : : INTDECL (dwfl_report_end)
494 : : INTDECL (dwfl_build_id_find_elf)
495 : : INTDECL (dwfl_build_id_find_debuginfo)
496 : : INTDECL (dwfl_standard_find_debuginfo)
497 : : INTDECL (dwfl_link_map_report)
498 : : INTDECL (dwfl_linux_kernel_find_elf)
499 : : INTDECL (dwfl_linux_kernel_module_section_address)
500 : : INTDECL (dwfl_linux_proc_report)
501 : : INTDECL (dwfl_linux_proc_maps_report)
502 : : INTDECL (dwfl_linux_proc_find_elf)
503 : : INTDECL (dwfl_linux_kernel_report_kernel)
504 : : INTDECL (dwfl_linux_kernel_report_modules)
505 : : INTDECL (dwfl_linux_kernel_report_offline)
506 : : INTDECL (dwfl_offline_section_address)
507 : : INTDECL (dwfl_module_relocate_address)
508 : : INTDECL (dwfl_module_dwarf_cfi)
509 : : INTDECL (dwfl_module_eh_cfi)
510 : :
511 : : /* Leading arguments standard to callbacks passed a Dwfl_Module. */
512 : : #define MODCB_ARGS(mod) (mod), &(mod)->userdata, (mod)->name, (mod)->low_addr
513 : : #define CBFAIL (errno ? DWFL_E (ERRNO, errno) : DWFL_E_CB);
514 : :
515 : :
516 : : /* The default used by dwfl_standard_find_debuginfo. */
517 : : #define DEFAULT_DEBUGINFO_PATH ":.debug:/usr/lib/debug"
518 : :
519 : :
520 : : #endif /* libdwflP.h */
|