libdwflP.h revision fe8b42e6131b74829fe31d15f31349cade566a59
1b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Internal definitions for libdwfl. 2bca43152aa0bcb31b9442c407bf2b86379761c50Roland McGrath Copyright (C) 2005, 2006, 2007, 2008, 2009 Red Hat, Inc. 3361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper This file is part of Red Hat elfutils. 4b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 5361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper Red Hat elfutils is free software; you can redistribute it and/or modify 6361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper it under the terms of the GNU General Public License as published by the 7361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper Free Software Foundation; version 2 of the License. 8b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 9361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper Red Hat elfutils is distributed in the hope that it will be useful, but 10361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper WITHOUT ANY WARRANTY; without even the implied warranty of 11361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper General Public License for more details. 13361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper 14361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper You should have received a copy of the GNU General Public License along 15361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper with Red Hat elfutils; if not, write to the Free Software Foundation, 161e9ef50681e20ef14c2ba38aef37a71ff148be08Ulrich Drepper Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper 18361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper In addition, as a special exception, Red Hat, Inc. gives You the 19361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper additional right to link the code of Red Hat elfutils with code licensed 20361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper under any Open Source Initiative certified open source license 21361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper (http://www.opensource.org/licenses/index.php) which requires the 22361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper distribution of source code with any binary distribution and to 23361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper distribute linked combinations of the two. Non-GPL Code permitted under 24361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper this exception must only link to the code of Red Hat elfutils through 25361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper those well defined interfaces identified in the file named EXCEPTION 26361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper found in the source code files (the "Approved Interfaces"). The files 27361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper of Non-GPL Code may instantiate templates or use macros or inline 28361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper functions from the Approved Interfaces without causing the resulting 29361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper work to be covered by the GNU General Public License. Only Red Hat, 30361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper Inc. may make changes or additions to the list of Approved Interfaces. 31361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper Red Hat's grant of this exception is conditioned upon your not adding 32361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper any new exceptions. If you wish to add a new Approved Interface or 33361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper exception, please contact Red Hat. You must obey the GNU General Public 34361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper License in all respects for all of the Red Hat elfutils code and other 35361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper code used in conjunction with Red Hat elfutils except the Non-GPL Code 36361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper covered by this exception. If you modify this file, you may extend this 37361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper exception to your version of the file, but you are not obligated to do 38361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper so. If you do not wish to provide this exception without modification, 39361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper you must delete this exception statement from your version and license 40361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper this file solely under the GPL without exception. 41361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper 42361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper Red Hat elfutils is an included package of the Open Invention Network. 43361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper An included package of the Open Invention Network is a package for which 44361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper Open Invention Network licensees cross-license their patents. No patent 45361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper license is granted, either expressly or impliedly, by designation as an 46361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper included package. Should you wish to participate in the Open Invention 47361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper Network licensing program, please visit www.openinventionnetwork.com 48361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper <http://www.openinventionnetwork.com>. */ 49b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 50b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#ifndef _LIBDWFLP_H 51b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#define _LIBDWFLP_H 1 52b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 5355d34a5ac854be02fa10186182bc22685923c703Roland McGrath#ifndef PACKAGE_NAME 54b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper# include <config.h> 55b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#endif 56b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#include <libdwfl.h> 57b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#include <libebl.h> 58b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#include <assert.h> 59b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#include <errno.h> 60b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#include <stdbool.h> 61b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#include <stdlib.h> 62b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#include <string.h> 63b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 644959bf89d92b59ba72bea5786d7b3f9b5564f750Roland McGrath#include "../libdw/libdwP.h" /* We need its INTDECLs. */ 654959bf89d92b59ba72bea5786d7b3f9b5564f750Roland McGrath 66b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* gettext helper macros. */ 67b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#define _(Str) dgettext ("elfutils", Str) 68b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 69b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#define DWFL_ERRORS \ 70b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWFL_ERROR (NOERROR, N_("no error")) \ 71b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWFL_ERROR (UNKNOWN_ERROR, N_("unknown error")) \ 72b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWFL_ERROR (NOMEM, N_("out of memory")) \ 73b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWFL_ERROR (ERRNO, N_("See errno")) \ 74b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWFL_ERROR (LIBELF, N_("See elf_errno")) \ 75b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWFL_ERROR (LIBDW, N_("See dwarf_errno")) \ 76b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWFL_ERROR (LIBEBL, N_("See ebl_errno (XXX missing)")) \ 77bca43152aa0bcb31b9442c407bf2b86379761c50Roland McGrath DWFL_ERROR (ZLIB, N_("gzip decompression failed")) \ 78bca43152aa0bcb31b9442c407bf2b86379761c50Roland McGrath DWFL_ERROR (BZLIB, N_("bzip2 decompression failed")) \ 7907d4f2fc1cb53f170a71bc13617bbdd9cb1c3c60Roland McGrath DWFL_ERROR (UNKNOWN_MACHINE, N_("no support library found for machine")) \ 80b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWFL_ERROR (NOREL, N_("Callbacks missing for ET_REL file")) \ 81b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWFL_ERROR (BADRELTYPE, N_("Unsupported relocation type")) \ 82b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWFL_ERROR (BADRELOFF, N_("r_offset is bogus")) \ 83b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWFL_ERROR (BADSTROFF, N_("offset out of range")) \ 84b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWFL_ERROR (RELUNDEF, N_("relocation refers to undefined symbol")) \ 85b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWFL_ERROR (CB, N_("Callback returned failure")) \ 86b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWFL_ERROR (NO_DWARF, N_("No DWARF information found")) \ 87b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWFL_ERROR (NO_SYMTAB, N_("No symbol table found")) \ 88b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWFL_ERROR (NO_PHDR, N_("No ELF program headers")) \ 89b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWFL_ERROR (OVERLAP, N_("address range overlaps an existing module")) \ 90b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWFL_ERROR (ADDR_OUTOFRANGE, N_("address out of range")) \ 91b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWFL_ERROR (NO_MATCH, N_("no matching address range")) \ 92b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWFL_ERROR (TRUNCATED, N_("image truncated")) \ 9359ea7f33f781e6e3f8c9d81d457e5d99eee8f1ceRoland McGrath DWFL_ERROR (ALREADY_ELF, N_("ELF file opened")) \ 94e47ab76f02c2a4f4d802ec298969ba67956435feRoland McGrath DWFL_ERROR (BADELF, N_("not a valid ELF file")) \ 95e47ab76f02c2a4f4d802ec298969ba67956435feRoland McGrath DWFL_ERROR (WEIRD_TYPE, N_("cannot handle DWARF type description")) 96b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 97b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#define DWFL_ERROR(name, text) DWFL_E_##name, 98b08d5a8fb42f4586d756068065186b5af7e48daUlrich Dreppertypedef enum { DWFL_ERRORS DWFL_E_NUM } Dwfl_Error; 99b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#undef DWFL_ERROR 100b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 101b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#define OTHER_ERROR(name) ((unsigned int) DWFL_E_##name << 16) 102b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#define DWFL_E(name, errno) (OTHER_ERROR (name) | (errno)) 103b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 104d11f9cbecac4a5ac3848a68597028d1924f3ff6bRoland McGrathextern int __libdwfl_canon_error (Dwfl_Error) internal_function; 105d11f9cbecac4a5ac3848a68597028d1924f3ff6bRoland McGrathextern void __libdwfl_seterrno (Dwfl_Error) internal_function; 106b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 107b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperstruct Dwfl 108b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper{ 109b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper const Dwfl_Callbacks *callbacks; 110b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 111b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwfl_Module *modulelist; /* List in order used by full traversals. */ 112b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 113d17fac7e89666b47811581b10b5ca0d253a3a82dRoland McGrath GElf_Addr offline_next_address; 114b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath 115b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath GElf_Addr segment_align; /* Smallest granularity of segments. */ 116b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath 117b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath /* Binary search table in three parallel malloc'd arrays. */ 118b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath size_t lookup_elts; /* Elements in use. */ 119b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath size_t lookup_alloc; /* Elements allococated. */ 120b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath GElf_Addr *lookup_addr; /* Start address of segment. */ 121b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath Dwfl_Module **lookup_module; /* Module associated with segment, or null. */ 122b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath int *lookup_segndx; /* User segment index, or -1. */ 123b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath 124b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath /* Cache from last dwfl_report_segment call. */ 125b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath const void *lookup_tail_ident; 126b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath GElf_Off lookup_tail_vaddr; 127b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath GElf_Off lookup_tail_offset; 128b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath int lookup_tail_ndx; 129b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper}; 130b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 131d17fac7e89666b47811581b10b5ca0d253a3a82dRoland McGrath#define OFFLINE_REDZONE 0x10000 132d17fac7e89666b47811581b10b5ca0d253a3a82dRoland McGrath 133b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperstruct dwfl_file 134b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper{ 135b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper char *name; 136b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper int fd; 13759ea7f33f781e6e3f8c9d81d457e5d99eee8f1ceRoland McGrath bool valid; /* The build ID note has been matched. */ 138e4c22ea004c02a58f5db5eb53794275344c17958Roland McGrath bool relocated; /* Partial relocation of all sections done. */ 139b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 140b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Elf *elf; 141b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper GElf_Addr bias; /* Actual load address - p_vaddr. */ 142b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper}; 143b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 144b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperstruct Dwfl_Module 145b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper{ 146b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwfl *dwfl; 147d17fac7e89666b47811581b10b5ca0d253a3a82dRoland McGrath struct Dwfl_Module *next; /* Link on Dwfl.modulelist. */ 148b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 149b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper void *userdata; 150b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 151b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper char *name; /* Iterator name for this module. */ 152b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper GElf_Addr low_addr, high_addr; 153b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 154b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper struct dwfl_file main, debug; 155b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Ebl *ebl; 156d17fac7e89666b47811581b10b5ca0d253a3a82dRoland McGrath GElf_Half e_type; /* GElf_Ehdr.e_type cache. */ 157b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwfl_Error elferr; /* Previous failure to open main file. */ 158b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 159d17fac7e89666b47811581b10b5ca0d253a3a82dRoland McGrath struct dwfl_relocation *reloc_info; /* Relocatable sections. */ 160d17fac7e89666b47811581b10b5ca0d253a3a82dRoland McGrath 161b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper struct dwfl_file *symfile; /* Either main or debug. */ 162b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Elf_Data *symdata; /* Data in the ELF symbol table section. */ 163b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper size_t syments; /* sh_size / sh_entsize of that section. */ 164e1812e1d90090450e3d93be56a487e2f11affcedUlrich Drepper Elf_Data *symstrdata; /* Data for its string table. */ 165b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Elf_Data *symxndxdata; /* Data in the extended section index table. */ 166b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 167b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwarf *dw; /* libdw handle for its debugging info. */ 168fe8b42e6131b74829fe31d15f31349cade566a59Roland McGrath 169fe8b42e6131b74829fe31d15f31349cade566a59Roland McGrath Dwfl_Error symerr; /* Previous failure to load symbols. */ 170fe8b42e6131b74829fe31d15f31349cade566a59Roland McGrath Dwfl_Error dwerr; /* Previous failure to load DWARF. */ 171b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 172b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper /* Known CU's in this module. */ 173b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper struct dwfl_cu *first_cu, **cu; 174b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 175b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper void *lazy_cu_root; /* Table indexed by Dwarf_Off of CU. */ 176b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 177b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper struct dwfl_arange *aranges; /* Mapping of addresses in module to CUs. */ 178fe8b42e6131b74829fe31d15f31349cade566a59Roland McGrath 179fe8b42e6131b74829fe31d15f31349cade566a59Roland McGrath void *build_id_bits; /* malloc'd copy of build ID bits. */ 180fe8b42e6131b74829fe31d15f31349cade566a59Roland McGrath GElf_Addr build_id_vaddr; /* Address where they reside, 0 if unknown. */ 181fe8b42e6131b74829fe31d15f31349cade566a59Roland McGrath int build_id_len; /* -1 for prior failure, 0 if unset. */ 182fe8b42e6131b74829fe31d15f31349cade566a59Roland McGrath 183fe8b42e6131b74829fe31d15f31349cade566a59Roland McGrath unsigned int ncu; 184fe8b42e6131b74829fe31d15f31349cade566a59Roland McGrath unsigned int lazycu; /* Possible users, deleted when none left. */ 185b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper unsigned int naranges; 186b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 187b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath int segment; /* Index of first segment table entry. */ 188b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper bool gc; /* Mark/sweep flag. */ 189b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper}; 190b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 191b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 192b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 193b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Information cached about each CU in Dwfl_Module.dw. */ 194b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperstruct dwfl_cu 195b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper{ 196b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper /* This caches libdw information about the CU. It's also the 197b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper address passed back to users, so we take advantage of the 198b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper fact that it's placed first to cast back. */ 199b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwarf_Die die; 200b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 201b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwfl_Module *mod; /* Pointer back to containing module. */ 202b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 203b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper struct dwfl_cu *next; /* CU immediately following in the file. */ 204b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 205b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper struct Dwfl_Lines *lines; 206b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper}; 207b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 208b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperstruct Dwfl_Lines 209b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper{ 210b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper struct dwfl_cu *cu; 211b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 212b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper /* This is what the opaque Dwfl_Line * pointers we pass to users are. 213b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper We need to recover pointers to our struct dwfl_cu and a record in 214b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper libdw's Dwarf_Line table. To minimize the memory used in addition 215b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper to libdw's Dwarf_Lines buffer, we just point to our own index in 216b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper this table, and have one pointer back to the CU. The indices here 217b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper match those in libdw's Dwarf_CU.lines->info table. */ 218b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper struct Dwfl_Line 219b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper { 220b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper unsigned int idx; /* My index in the dwfl_cu.lines table. */ 221b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper } idx[0]; 222b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper}; 223b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 224b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperstatic inline struct dwfl_cu * 225e1812e1d90090450e3d93be56a487e2f11affcedUlrich Drepperdwfl_linecu_inline (const Dwfl_Line *line) 226b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper{ 227b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper const struct Dwfl_Lines *lines = ((const void *) line 228b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper - offsetof (struct Dwfl_Lines, 229b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper idx[line->idx])); 230b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper return lines->cu; 231b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper} 232e1812e1d90090450e3d93be56a487e2f11affcedUlrich Drepper#define dwfl_linecu dwfl_linecu_inline 233b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 234b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* This describes a contiguous address range that lies in a single CU. 235b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper We condense runs of Dwarf_Arange entries for the same CU into this. */ 236b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperstruct dwfl_arange 237b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper{ 238b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper struct dwfl_cu *cu; 239b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper size_t arange; /* Index in Dwarf_Aranges. */ 240b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper}; 241b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 242b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 243b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 244b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperextern void __libdwfl_module_free (Dwfl_Module *mod) internal_function; 245b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 246a605a3c8f354895f4cca56aca8f8aa468b506fdfRoland McGrath/* Find the main ELF file, update MOD->elferr and/or MOD->main.elf. */ 247a605a3c8f354895f4cca56aca8f8aa468b506fdfRoland McGrathextern void __libdwfl_getelf (Dwfl_Module *mod) internal_function; 248b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 249b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Process relocations in debugging sections in an ET_REL file. 250e4c22ea004c02a58f5db5eb53794275344c17958Roland McGrath FILE must be opened with ELF_C_READ_MMAP_PRIVATE or ELF_C_READ, 251b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper to make it possible to relocate the data in place (or ELF_C_RDWR or 252b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper ELF_C_RDWR_MMAP if you intend to modify the Elf file on disk). After 253e4c22ea004c02a58f5db5eb53794275344c17958Roland McGrath this, dwarf_begin_elf on FILE will read the relocated data. 254e4c22ea004c02a58f5db5eb53794275344c17958Roland McGrath 255e4c22ea004c02a58f5db5eb53794275344c17958Roland McGrath When DEBUG is false, apply partial relocation to all sections. */ 256e4c22ea004c02a58f5db5eb53794275344c17958Roland McGrathextern Dwfl_Error __libdwfl_relocate (Dwfl_Module *mod, Elf *file, bool debug) 257e4c22ea004c02a58f5db5eb53794275344c17958Roland McGrath internal_function; 258e4c22ea004c02a58f5db5eb53794275344c17958Roland McGrath 259e4c22ea004c02a58f5db5eb53794275344c17958Roland McGrath/* Process (simple) relocations in arbitrary section TSCN of an ET_REL file. 260e4c22ea004c02a58f5db5eb53794275344c17958Roland McGrath RELOCSCN is SHT_REL or SHT_RELA and TSCN is its sh_info target section. */ 261e4c22ea004c02a58f5db5eb53794275344c17958Roland McGrathextern Dwfl_Error __libdwfl_relocate_section (Dwfl_Module *mod, Elf *relocated, 262e4c22ea004c02a58f5db5eb53794275344c17958Roland McGrath Elf_Scn *relocscn, Elf_Scn *tscn, 263e4c22ea004c02a58f5db5eb53794275344c17958Roland McGrath bool partial) 264d2c5996f70844ae7816034b56e769ce163251718Roland McGrath internal_function; 265b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 266b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Adjust *VALUE from section-relative to absolute. 267b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper MOD->dwfl->callbacks->section_address is called to determine the actual 268b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper address of a loaded section. */ 269b597dfad924980dede10d7c19d87900b6172e599Ulrich Drepperextern Dwfl_Error __libdwfl_relocate_value (Dwfl_Module *mod, Elf *elf, 270b597dfad924980dede10d7c19d87900b6172e599Ulrich Drepper size_t *shstrndx_cache, 271b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Elf32_Word shndx, 272b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper GElf_Addr *value) 273b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper internal_function; 274b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 275994b4899278199fc4d307780dac0ea50b238bc74Roland McGrath 276994b4899278199fc4d307780dac0ea50b238bc74Roland McGrath/* Ensure that MOD->ebl is set up. */ 277994b4899278199fc4d307780dac0ea50b238bc74Roland McGrathextern Dwfl_Error __libdwfl_module_getebl (Dwfl_Module *mod) internal_function; 278994b4899278199fc4d307780dac0ea50b238bc74Roland McGrath 279b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Iterate through all the CU's in the module. Start by passing a null 280b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper LASTCU, and then pass the last *CU returned. Success return with null 281b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper *CU no more CUs. */ 282b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperextern Dwfl_Error __libdwfl_nextcu (Dwfl_Module *mod, struct dwfl_cu *lastcu, 283b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper struct dwfl_cu **cu) internal_function; 284b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 285b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Find the CU by address. */ 286b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperextern Dwfl_Error __libdwfl_addrcu (Dwfl_Module *mod, Dwarf_Addr addr, 287b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper struct dwfl_cu **cu) internal_function; 288b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 289b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Ensure that CU->lines (and CU->cu->lines) is set up. */ 290b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperextern Dwfl_Error __libdwfl_cu_getsrclines (struct dwfl_cu *cu) 29159ea7f33f781e6e3f8c9d81d457e5d99eee8f1ceRoland McGrath internal_function; 29259ea7f33f781e6e3f8c9d81d457e5d99eee8f1ceRoland McGrath 29359ea7f33f781e6e3f8c9d81d457e5d99eee8f1ceRoland McGrath/* Look in ELF for an NT_GNU_BUILD_ID note. If SET is true, store it 29459ea7f33f781e6e3f8c9d81d457e5d99eee8f1ceRoland McGrath in MOD and return its length. If SET is false, instead compare it 29559ea7f33f781e6e3f8c9d81d457e5d99eee8f1ceRoland McGrath to that stored in MOD and return 2 if they match, 1 if they do not. 29659ea7f33f781e6e3f8c9d81d457e5d99eee8f1ceRoland McGrath Returns -1 for errors, 0 if no note is found. */ 29759ea7f33f781e6e3f8c9d81d457e5d99eee8f1ceRoland McGrathextern int __libdwfl_find_build_id (Dwfl_Module *mod, bool set, Elf *elf) 29859ea7f33f781e6e3f8c9d81d457e5d99eee8f1ceRoland McGrath internal_function; 299b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 30059ea7f33f781e6e3f8c9d81d457e5d99eee8f1ceRoland McGrath/* Open a main or debuginfo file by its build ID, returns the fd. */ 30159ea7f33f781e6e3f8c9d81d457e5d99eee8f1ceRoland McGrathextern int __libdwfl_open_by_build_id (Dwfl_Module *mod, bool debug, 30259ea7f33f781e6e3f8c9d81d457e5d99eee8f1ceRoland McGrath char **file_name) internal_function; 303b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 30418618fd74777576cc20dce341bb71be327f9ed48Ulrich Drepperextern uint32_t __libdwfl_crc32 (uint32_t crc, unsigned char *buf, size_t len) 30559ea7f33f781e6e3f8c9d81d457e5d99eee8f1ceRoland McGrath attribute_hidden; 30618618fd74777576cc20dce341bb71be327f9ed48Ulrich Drepperextern int __libdwfl_crc32_file (int fd, uint32_t *resp) attribute_hidden; 30718618fd74777576cc20dce341bb71be327f9ed48Ulrich Drepper 308b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 309b597dfad924980dede10d7c19d87900b6172e599Ulrich Drepper/* Meat of dwfl_report_elf, given elf_begin just called. 310b597dfad924980dede10d7c19d87900b6172e599Ulrich Drepper Consumes ELF on success, not on failure. */ 311b597dfad924980dede10d7c19d87900b6172e599Ulrich Drepperextern Dwfl_Module *__libdwfl_report_elf (Dwfl *dwfl, const char *name, 312b597dfad924980dede10d7c19d87900b6172e599Ulrich Drepper const char *file_name, int fd, 3135453abf2ab7626daeab2506ebc6ed067f5063eb4Roland McGrath Elf *elf, GElf_Addr base, bool sanity) 314b597dfad924980dede10d7c19d87900b6172e599Ulrich Drepper internal_function; 315b597dfad924980dede10d7c19d87900b6172e599Ulrich Drepper 316b597dfad924980dede10d7c19d87900b6172e599Ulrich Drepper/* Meat of dwfl_report_offline. */ 317b597dfad924980dede10d7c19d87900b6172e599Ulrich Drepperextern Dwfl_Module *__libdwfl_report_offline (Dwfl *dwfl, const char *name, 318b597dfad924980dede10d7c19d87900b6172e599Ulrich Drepper const char *file_name, 319b597dfad924980dede10d7c19d87900b6172e599Ulrich Drepper int fd, bool closefd, 320b597dfad924980dede10d7c19d87900b6172e599Ulrich Drepper int (*predicate) (const char *, 321b597dfad924980dede10d7c19d87900b6172e599Ulrich Drepper const char *)) 322b597dfad924980dede10d7c19d87900b6172e599Ulrich Drepper internal_function; 323b597dfad924980dede10d7c19d87900b6172e599Ulrich Drepper 324bca43152aa0bcb31b9442c407bf2b86379761c50Roland McGrath/* Decompression wrappers: decompress whole file into memory. */ 325bca43152aa0bcb31b9442c407bf2b86379761c50Roland McGrathextern Dwfl_Error __libdw_gunzip (int fd, off64_t start_offset, 326bca43152aa0bcb31b9442c407bf2b86379761c50Roland McGrath void *mapped, size_t mapped_size, 327bca43152aa0bcb31b9442c407bf2b86379761c50Roland McGrath void **whole, size_t *whole_size) 328bca43152aa0bcb31b9442c407bf2b86379761c50Roland McGrath internal_function; 329bca43152aa0bcb31b9442c407bf2b86379761c50Roland McGrathextern Dwfl_Error __libdw_bunzip2 (int fd, off64_t start_offset, 330bca43152aa0bcb31b9442c407bf2b86379761c50Roland McGrath void *mapped, size_t mapped_size, 331bca43152aa0bcb31b9442c407bf2b86379761c50Roland McGrath void **whole, size_t *whole_size) 332bca43152aa0bcb31b9442c407bf2b86379761c50Roland McGrath internal_function; 333bca43152aa0bcb31b9442c407bf2b86379761c50Roland McGrath 334bca43152aa0bcb31b9442c407bf2b86379761c50Roland McGrath/* Open Elf handle on *FDP. This handles decompression and checks 335bca43152aa0bcb31b9442c407bf2b86379761c50Roland McGrath elf_kind. Succeed only for ELF_K_ELF, or also ELF_K_AR if ARCHIVE_OK. 336bca43152aa0bcb31b9442c407bf2b86379761c50Roland McGrath Returns DWFL_E_NOERROR and sets *ELFP on success, resets *FDP to -1 if 337bca43152aa0bcb31b9442c407bf2b86379761c50Roland McGrath it's no longer used. Resets *FDP on failure too iff CLOSE_ON_FAIL. */ 338bca43152aa0bcb31b9442c407bf2b86379761c50Roland McGrathextern Dwfl_Error __libdw_open_file (int *fdp, Elf **elfp, 339bca43152aa0bcb31b9442c407bf2b86379761c50Roland McGrath bool close_on_fail, bool archive_ok) 340bca43152aa0bcb31b9442c407bf2b86379761c50Roland McGrath internal_function; 341b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 342b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath/* These are working nicely for --core, but are not ready to be 343b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath exported interfaces quite yet. */ 344b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath 345b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath/* Type of callback function ... 346b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath */ 347b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrathtypedef bool Dwfl_Memory_Callback (Dwfl *dwfl, int segndx, 348b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath void **buffer, size_t *buffer_available, 349b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath GElf_Addr vaddr, size_t minread, void *arg); 350b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath 351b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath/* Type of callback function ... 352b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath */ 353b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrathtypedef bool Dwfl_Module_Callback (Dwfl_Module *mod, void **userdata, 354b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath const char *name, Dwarf_Addr base, 355b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath void **buffer, size_t *buffer_available, 356b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath GElf_Off cost, GElf_Off worthwhile, 357b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath GElf_Off whole, GElf_Off contiguous, 358b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath void *arg, Elf **elfp); 359b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath 360b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath/* ... 361b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath */ 362b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrathextern int dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name, 363b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath Dwfl_Memory_Callback *memory_callback, 364b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath void *memory_callback_arg, 365b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath Dwfl_Module_Callback *read_eagerly, 366b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath void *read_eagerly_arg); 367b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath 368b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath/* Report a module for entry in the dynamic linker's struct link_map list. 369b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath For each link_map entry, if an existing module resides at its address, 370b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath this just modifies that module's name and suggested file name. If 371b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath no such module exists, this calls dwfl_report_elf on the l_name string. 372b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath 373b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath If AUXV is not null, it points to AUXV_SIZE bytes of auxiliary vector 374b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath data as contained in an NT_AUXV note or read from a /proc/pid/auxv 375b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath file. When this is available, it guides the search. If AUXV is null 376b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath or the memory it points to is not accessible, then this search can 377b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath only find where to begin if the correct executable file was 378b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath previously reported and preloaded as with dwfl_report_elf. 379b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath 380b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath Returns the number of modules found, or -1 for errors. */ 381b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrathextern int dwfl_link_map_report (Dwfl *dwfl, const void *auxv, size_t auxv_size, 382b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath Dwfl_Memory_Callback *memory_callback, 383b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath void *memory_callback_arg); 384b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath 385b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath/* Examine an ET_CORE file and report modules based on its contents. */ 386b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrathextern int dwfl_core_file_report (Dwfl *dwfl, Elf *elf, const GElf_Ehdr *ehdr); 387b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath 388b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrath 389bca43152aa0bcb31b9442c407bf2b86379761c50Roland McGrath 390b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Avoid PLT entries. */ 391b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwfl_begin) 392b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwfl_errmsg) 393b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwfl_addrmodule) 394b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrathINTDECL (dwfl_addrsegment) 395b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwfl_addrdwarf) 396b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwfl_addrdie) 397b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrathINTDECL (dwfl_core_file_report) 398b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrathINTDECL (dwfl_getmodules) 399b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwfl_module_addrdie) 400b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrathINTDECL (dwfl_module_address_section) 4016258e7486eb3eed6e50005946795c5fbf73aa106Ulrich DrepperINTDECL (dwfl_module_addrsym) 40259ea7f33f781e6e3f8c9d81d457e5d99eee8f1ceRoland McGrathINTDECL (dwfl_module_build_id) 403b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwfl_module_getdwarf) 404b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwfl_module_getelf) 405e1812e1d90090450e3d93be56a487e2f11affcedUlrich DrepperINTDECL (dwfl_module_getsym) 406e1812e1d90090450e3d93be56a487e2f11affcedUlrich DrepperINTDECL (dwfl_module_getsymtab) 407b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwfl_module_getsrc) 40859ea7f33f781e6e3f8c9d81d457e5d99eee8f1ceRoland McGrathINTDECL (dwfl_module_report_build_id) 409b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwfl_report_elf) 410b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwfl_report_begin) 4116258e7486eb3eed6e50005946795c5fbf73aa106Ulrich DrepperINTDECL (dwfl_report_begin_add) 412b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwfl_report_module) 413b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrathINTDECL (dwfl_report_segment) 414d17fac7e89666b47811581b10b5ca0d253a3a82dRoland McGrathINTDECL (dwfl_report_offline) 415b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwfl_report_end) 41659ea7f33f781e6e3f8c9d81d457e5d99eee8f1ceRoland McGrathINTDECL (dwfl_build_id_find_elf) 41759ea7f33f781e6e3f8c9d81d457e5d99eee8f1ceRoland McGrathINTDECL (dwfl_build_id_find_debuginfo) 418b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwfl_standard_find_debuginfo) 419b4d6f0f8064f2b706ea9035ef0393d8299671390Roland McGrathINTDECL (dwfl_link_map_report) 420b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwfl_linux_kernel_find_elf) 421b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwfl_linux_kernel_module_section_address) 422b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwfl_linux_proc_report) 4231656bc00ae97fa16a941a8cefacc4e01488d0e8aRoland McGrathINTDECL (dwfl_linux_proc_maps_report) 424b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwfl_linux_proc_find_elf) 425b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwfl_linux_kernel_report_kernel) 426b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwfl_linux_kernel_report_modules) 427d17fac7e89666b47811581b10b5ca0d253a3a82dRoland McGrathINTDECL (dwfl_linux_kernel_report_offline) 428d17fac7e89666b47811581b10b5ca0d253a3a82dRoland McGrathINTDECL (dwfl_offline_section_address) 429d17fac7e89666b47811581b10b5ca0d253a3a82dRoland McGrathINTDECL (dwfl_module_relocate_address) 430b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 431b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Leading arguments standard to callbacks passed a Dwfl_Module. */ 432b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#define MODCB_ARGS(mod) (mod), &(mod)->userdata, (mod)->name, (mod)->low_addr 433b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#define CBFAIL (errno ? DWFL_E (ERRNO, errno) : DWFL_E_CB); 434b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 435b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 436a1cee0760dceaeca52aff9498b144978537d5a16Roland McGrath/* The default used by dwfl_standard_find_debuginfo. */ 437a1cee0760dceaeca52aff9498b144978537d5a16Roland McGrath#define DEFAULT_DEBUGINFO_PATH ":.debug:/usr/lib/debug" 438a1cee0760dceaeca52aff9498b144978537d5a16Roland McGrath 439a1cee0760dceaeca52aff9498b144978537d5a16Roland McGrath 440b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#endif /* libdwflP.h */ 441