libdwP.h revision 725aad5d2f8b78ed21a5e253fb38f9722c2c8b2d
1b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Internal definitions for libdwarf. 2725aad5d2f8b78ed21a5e253fb38f9722c2c8b2dRoland McGrath Copyright (C) 2002-2011 Red Hat, Inc. 3361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper This file is part of Red Hat elfutils. 4b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Written by Ulrich Drepper <drepper@redhat.com>, 2002. 5b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 6361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper Red Hat elfutils is free software; you can redistribute it and/or modify 7361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper it under the terms of the GNU General Public License as published by the 8361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper Free Software Foundation; version 2 of the License. 9b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 10361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper Red Hat elfutils is distributed in the hope that it will be useful, but 11361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper WITHOUT ANY WARRANTY; without even the implied warranty of 12361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper General Public License for more details. 14361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper 15361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper You should have received a copy of the GNU General Public License along 16361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper with Red Hat elfutils; if not, write to the Free Software Foundation, 171e9ef50681e20ef14c2ba38aef37a71ff148be08Ulrich Drepper Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper 19361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper In addition, as a special exception, Red Hat, Inc. gives You the 20361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper additional right to link the code of Red Hat elfutils with code licensed 21361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper under any Open Source Initiative certified open source license 22361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper (http://www.opensource.org/licenses/index.php) which requires the 23361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper distribution of source code with any binary distribution and to 24361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper distribute linked combinations of the two. Non-GPL Code permitted under 25361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper this exception must only link to the code of Red Hat elfutils through 26361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper those well defined interfaces identified in the file named EXCEPTION 27361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper found in the source code files (the "Approved Interfaces"). The files 28361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper of Non-GPL Code may instantiate templates or use macros or inline 29361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper functions from the Approved Interfaces without causing the resulting 30361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper work to be covered by the GNU General Public License. Only Red Hat, 31361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper Inc. may make changes or additions to the list of Approved Interfaces. 32361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper Red Hat's grant of this exception is conditioned upon your not adding 33361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper any new exceptions. If you wish to add a new Approved Interface or 34361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper exception, please contact Red Hat. You must obey the GNU General Public 35361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper License in all respects for all of the Red Hat elfutils code and other 36361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper code used in conjunction with Red Hat elfutils except the Non-GPL Code 37361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper covered by this exception. If you modify this file, you may extend this 38361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper exception to your version of the file, but you are not obligated to do 39361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper so. If you do not wish to provide this exception without modification, 40361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper you must delete this exception statement from your version and license 41361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper this file solely under the GPL without exception. 42361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper 43361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper Red Hat elfutils is an included package of the Open Invention Network. 44361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper An included package of the Open Invention Network is a package for which 45361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper Open Invention Network licensees cross-license their patents. No patent 46361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper license is granted, either expressly or impliedly, by designation as an 47361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper included package. Should you wish to participate in the Open Invention 48361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper Network licensing program, please visit www.openinventionnetwork.com 49361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper <http://www.openinventionnetwork.com>. */ 50b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 51b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#ifndef _LIBDWP_H 52b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#define _LIBDWP_H 1 53b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 54b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#include <libintl.h> 55b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#include <stdbool.h> 56b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 57b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#include <libdw.h> 58b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 59b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 60b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* gettext helper macros. */ 61b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#define _(Str) dgettext ("elfutils", Str) 62b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 63b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 646724c90d02659f7466b67b357563042e403d154eRoland McGrath/* Known location expressions already decoded. */ 65b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperstruct loc_s 66b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper{ 67b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper void *addr; 686724c90d02659f7466b67b357563042e403d154eRoland McGrath Dwarf_Op *loc; 69b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper size_t nloc; 70b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper}; 71b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 72f0371041995308d197447019eb2ac9285c96477bRoland McGrath/* Known DW_OP_implicit_value blocks already decoded. 73f0371041995308d197447019eb2ac9285c96477bRoland McGrath This overlaps struct loc_s exactly, but only the 74f0371041995308d197447019eb2ac9285c96477bRoland McGrath first member really has to match. */ 75f0371041995308d197447019eb2ac9285c96477bRoland McGrathstruct loc_block_s 76f0371041995308d197447019eb2ac9285c96477bRoland McGrath{ 77f0371041995308d197447019eb2ac9285c96477bRoland McGrath void *addr; 78f0371041995308d197447019eb2ac9285c96477bRoland McGrath unsigned char *data; 79f0371041995308d197447019eb2ac9285c96477bRoland McGrath size_t length; 80f0371041995308d197447019eb2ac9285c96477bRoland McGrath}; 81f0371041995308d197447019eb2ac9285c96477bRoland McGrath 82b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Valid indeces for the section data. */ 83b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperenum 84b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper { 85b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper IDX_debug_info = 0, 86827d4d176b989c5d765c7f349edff6f994f8ea78Roland McGrath IDX_debug_types, 87b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper IDX_debug_abbrev, 88b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper IDX_debug_aranges, 89b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper IDX_debug_line, 90b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper IDX_debug_frame, 91b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper IDX_debug_loc, 92b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper IDX_debug_pubnames, 93b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper IDX_debug_str, 94b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper IDX_debug_macinfo, 95b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper IDX_debug_ranges, 96b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper IDX_last 97b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper }; 98b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 99b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 100b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Error values. */ 101b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperenum 102b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper{ 103b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_NOERROR = 0, 104b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_UNKNOWN_ERROR, 105b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_INVALID_ACCESS, 106b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_NO_REGFILE, 107b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_IO_ERROR, 108b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_INVALID_ELF, 109b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_NO_DWARF, 110b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_NOELF, 111b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_GETEHDR_ERROR, 112b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_NOMEM, 113b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_UNIMPL, 114b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_INVALID_CMD, 115b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_INVALID_VERSION, 116b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_INVALID_FILE, 117b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_NO_ENTRY, 118b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_INVALID_DWARF, 119b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_NO_STRING, 120b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_NO_ADDR, 121b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_NO_CONSTANT, 122b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_NO_REFERENCE, 123b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_INVALID_REFERENCE, 124b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_NO_DEBUG_LINE, 125b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_INVALID_DEBUG_LINE, 126b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_TOO_BIG, 127b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_VERSION, 128b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_INVALID_DIR_IDX, 129b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_ADDR_OUTOFRANGE, 130b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_NO_LOCLIST, 131b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_NO_BLOCK, 132b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_INVALID_LINE_IDX, 133b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_INVALID_ARANGE_IDX, 134b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_NO_MATCH, 135b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_NO_FLAG, 136b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_INVALID_OFFSET, 137b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper DWARF_E_NO_DEBUG_RANGES, 1383c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath DWARF_E_INVALID_CFI, 139b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper}; 140b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 141b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 1423e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath#include "dwarf_sig8_hash.h" 1433e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath 144b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* This is the structure representing the debugging state. */ 145b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperstruct Dwarf 146b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper{ 147b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper /* The underlying ELF file. */ 148b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Elf *elf; 149b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 150b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper /* The section data. */ 151b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Elf_Data *sectiondata[IDX_last]; 152b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 153725aad5d2f8b78ed21a5e253fb38f9722c2c8b2dRoland McGrath#if USE_ZLIB 154725aad5d2f8b78ed21a5e253fb38f9722c2c8b2dRoland McGrath /* The 1 << N bit is set if sectiondata[N] is malloc'd decompressed data. */ 155725aad5d2f8b78ed21a5e253fb38f9722c2c8b2dRoland McGrath unsigned int sectiondata_gzip_mask:IDX_last; 156725aad5d2f8b78ed21a5e253fb38f9722c2c8b2dRoland McGrath#endif 157725aad5d2f8b78ed21a5e253fb38f9722c2c8b2dRoland McGrath 158b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper /* True if the file has a byte order different from the host. */ 159b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper bool other_byte_order; 160b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 161b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper /* If true, we allocated the ELF descriptor ourselves. */ 162b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper bool free_elf; 163b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 164b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper /* Information for traversing the .debug_pubnames section. This is 165b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper an array and separately allocated with malloc. */ 166b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper struct pubnames_s 167b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper { 168b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwarf_Off cu_offset; 169b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwarf_Off set_start; 170b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper unsigned int cu_header_size; 171b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper int address_len; 172b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper } *pubnames_sets; 173b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper size_t pubnames_nsets; 174b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 175b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper /* Search tree for the CUs. */ 176b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper void *cu_tree; 177b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwarf_Off next_cu_offset; 178b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 1792b1f09548b66c2c75d5be6f13cd9374adc95f8d8Roland McGrath /* Search tree and sig8 hash table for .debug_types type units. */ 1802b1f09548b66c2c75d5be6f13cd9374adc95f8d8Roland McGrath void *tu_tree; 1813e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath Dwarf_Off next_tu_offset; 1822b1f09548b66c2c75d5be6f13cd9374adc95f8d8Roland McGrath Dwarf_Sig8_Hash sig8_hash; 1833e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath 184b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper /* Address ranges. */ 185b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwarf_Aranges *aranges; 186b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 1873c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath /* Cached info from the CFI section. */ 1883c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath struct Dwarf_CFI_s *cfi; 1893c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath 190b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper /* Internal memory handling. This is basically a simplified 191b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper reimplementation of obstacks. Unfortunately the standard obstack 192b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper implementation is not usable in libraries. */ 193b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper struct libdw_memblock 194b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper { 195b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper size_t size; 196b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper size_t remaining; 197b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper struct libdw_memblock *prev; 198b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper char mem[0]; 199b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper } *mem_tail; 200b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 201b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper /* Default size of allocated memory blocks. */ 202b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper size_t mem_default_size; 203b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 204b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper /* Registered OOM handler. */ 205b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwarf_OOM oom_handler; 206b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper}; 207b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 208b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 209b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Abbreviation representation. */ 210b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperstruct Dwarf_Abbrev 211b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper{ 2121f6d2010bb26b6bf5395a98651fce9a1a9141ac3Roland McGrath Dwarf_Off offset; 2131f6d2010bb26b6bf5395a98651fce9a1a9141ac3Roland McGrath unsigned char *attrp; 2141f6d2010bb26b6bf5395a98651fce9a1a9141ac3Roland McGrath unsigned int attrcnt; 215b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper unsigned int code; 216b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper unsigned int tag; 2171f6d2010bb26b6bf5395a98651fce9a1a9141ac3Roland McGrath bool has_children; 218b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper}; 219b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 220b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#include "dwarf_abbrev_hash.h" 221b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 222b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 223b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Files in line information records. */ 224b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperstruct Dwarf_Files_s 225b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper { 226c5acb304d81cdbe3f8b923f2a6ac1bee3af9f498Roland McGrath struct Dwarf_CU *cu; 22743da9895c6d828ceae65a47f2337e8ef24eb97c1Roland McGrath unsigned int ndirs; 228b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper unsigned int nfiles; 229b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper struct Dwarf_Fileinfo_s 230b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper { 231b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper char *name; 232b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwarf_Word mtime; 233b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwarf_Word length; 234b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper } info[0]; 23543da9895c6d828ceae65a47f2337e8ef24eb97c1Roland McGrath /* nfiles of those, followed by char *[ndirs]. */ 236b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper }; 237b08d5a8fb42f4586d756068065186b5af7e48daUlrich Dreppertypedef struct Dwarf_Fileinfo_s Dwarf_Fileinfo; 238b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 239b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 240b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Representation of a row in the line table. */ 241b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 24203288f0df65115b75cf029825ecc9cf9158870a4Roland McGrathstruct Dwarf_Line_s 24303288f0df65115b75cf029825ecc9cf9158870a4Roland McGrath{ 2446e1f4658619e0a6bdbf64d7678b82f4e97645633Roland McGrath Dwarf_Files *files; 2456e1f4658619e0a6bdbf64d7678b82f4e97645633Roland McGrath 24603288f0df65115b75cf029825ecc9cf9158870a4Roland McGrath Dwarf_Addr addr; 24703288f0df65115b75cf029825ecc9cf9158870a4Roland McGrath unsigned int file; 24803288f0df65115b75cf029825ecc9cf9158870a4Roland McGrath int line; 24903288f0df65115b75cf029825ecc9cf9158870a4Roland McGrath unsigned short int column; 25003288f0df65115b75cf029825ecc9cf9158870a4Roland McGrath unsigned int is_stmt:1; 25103288f0df65115b75cf029825ecc9cf9158870a4Roland McGrath unsigned int basic_block:1; 25203288f0df65115b75cf029825ecc9cf9158870a4Roland McGrath unsigned int end_sequence:1; 25303288f0df65115b75cf029825ecc9cf9158870a4Roland McGrath unsigned int prologue_end:1; 25403288f0df65115b75cf029825ecc9cf9158870a4Roland McGrath unsigned int epilogue_begin:1; 255c70cf4e5e5a463b64673c4e80bcf60c938b437b4Roland McGrath /* The remaining bit fields are not flags, but hold values presumed to be 256c70cf4e5e5a463b64673c4e80bcf60c938b437b4Roland McGrath small. All the flags and other bit fields should add up to 48 bits 257c70cf4e5e5a463b64673c4e80bcf60c938b437b4Roland McGrath to give the whole struct a nice round size. */ 258c70cf4e5e5a463b64673c4e80bcf60c938b437b4Roland McGrath unsigned int op_index:8; 259c70cf4e5e5a463b64673c4e80bcf60c938b437b4Roland McGrath unsigned int isa:8; 260c70cf4e5e5a463b64673c4e80bcf60c938b437b4Roland McGrath unsigned int discriminator:24; 26103288f0df65115b75cf029825ecc9cf9158870a4Roland McGrath}; 26203288f0df65115b75cf029825ecc9cf9158870a4Roland McGrath 26303288f0df65115b75cf029825ecc9cf9158870a4Roland McGrathstruct Dwarf_Lines_s 26403288f0df65115b75cf029825ecc9cf9158870a4Roland McGrath{ 26503288f0df65115b75cf029825ecc9cf9158870a4Roland McGrath size_t nlines; 26603288f0df65115b75cf029825ecc9cf9158870a4Roland McGrath struct Dwarf_Line_s info[0]; 26703288f0df65115b75cf029825ecc9cf9158870a4Roland McGrath}; 268b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 269b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Representation of address ranges. */ 270b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperstruct Dwarf_Aranges_s 271b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper{ 272b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwarf *dbg; 273b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper size_t naranges; 274b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 275b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper struct Dwarf_Arange_s 276b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper { 277b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwarf_Addr addr; 278b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwarf_Word length; 279b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwarf_Off offset; 280b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper } info[0]; 281b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper}; 282b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 283b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 284b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* CU representation. */ 285b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperstruct Dwarf_CU 286b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper{ 287b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwarf *dbg; 288b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwarf_Off start; 289b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwarf_Off end; 290b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper uint8_t address_size; 291b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper uint8_t offset_size; 292e4c22ea004c02a58f5db5eb53794275344c17958Roland McGrath uint16_t version; 293b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 2943e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath /* Zero if this is a normal CU. Nonzero if it is a type unit. */ 2953e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath size_t type_offset; 2963e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath uint64_t type_sig8; 2973e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath 298b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper /* Hash table for the abbreviations. */ 299b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwarf_Abbrev_Hash abbrev_hash; 300b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper /* Offset of the first abbreviation. */ 301b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper size_t orig_abbrev_offset; 302b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper /* Offset past last read abbreviation. */ 303b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper size_t last_abbrev_offset; 304b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 305b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper /* The srcline information. */ 306b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwarf_Lines *lines; 307b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 308b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper /* The source file information. */ 309b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwarf_Files *files; 310b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 311b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper /* Known location lists. */ 312b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper void *locs; 313b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper}; 314b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 31535f08c4d52d0ffd9f8aa50f47b84de5603842b1fUlrich Drepper/* Compute the offset of a CU's first DIE from its offset. This 31635f08c4d52d0ffd9f8aa50f47b84de5603842b1fUlrich Drepper is either: 31735f08c4d52d0ffd9f8aa50f47b84de5603842b1fUlrich Drepper LEN VER OFFSET ADDR 31835f08c4d52d0ffd9f8aa50f47b84de5603842b1fUlrich Drepper 4-bytes + 2-bytes + 4-bytes + 1-byte for 32-bit dwarf 31935f08c4d52d0ffd9f8aa50f47b84de5603842b1fUlrich Drepper 12-bytes + 2-bytes + 8-bytes + 1-byte for 64-bit dwarf 3203e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath or in .debug_types, SIGNATURE TYPE-OFFSET 3213e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath 4-bytes + 2-bytes + 4-bytes + 1-byte + 8-bytes + 4-bytes for 32-bit 3223e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath 12-bytes + 2-bytes + 8-bytes + 1-byte + 8-bytes + 8-bytes for 64-bit 323a969d8e19470157be1b8b2e1a693ac7702bf4273Ulrich Drepper 32435f08c4d52d0ffd9f8aa50f47b84de5603842b1fUlrich Drepper Note the trick in the computation. If the offset_size is 4 32535f08c4d52d0ffd9f8aa50f47b84de5603842b1fUlrich Drepper the '- 4' term changes the '3 *' into a '2 *'. If the 32635f08c4d52d0ffd9f8aa50f47b84de5603842b1fUlrich Drepper offset_size is 8 it accounts for the 4-byte escape value 32735f08c4d52d0ffd9f8aa50f47b84de5603842b1fUlrich Drepper used at the start of the length. */ 3283e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath#define DIE_OFFSET_FROM_CU_OFFSET(cu_offset, offset_size, type_unit) \ 3293e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath ((type_unit) ? ((cu_offset) + 4 * (offset_size) - 4 + 3 + 8) \ 3303e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath : ((cu_offset) + 3 * (offset_size) - 4 + 3)) 33135f08c4d52d0ffd9f8aa50f47b84de5603842b1fUlrich Drepper 3323e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath#define CUDIE(fromcu) \ 3336724c90d02659f7466b67b357563042e403d154eRoland McGrath ((Dwarf_Die) \ 3346724c90d02659f7466b67b357563042e403d154eRoland McGrath { \ 3356724c90d02659f7466b67b357563042e403d154eRoland McGrath .cu = (fromcu), \ 3365cc030d6169713ff4711c28a6ce1250b142cd5b3Roland McGrath .addr = ((char *) cu_data (fromcu)->d_buf \ 3373e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath + DIE_OFFSET_FROM_CU_OFFSET ((fromcu)->start, \ 3383e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath (fromcu)->offset_size, \ 3393e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath (fromcu)->type_offset != 0)) \ 3403e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath }) \ 341b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 342b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 343b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Macro information. */ 344b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperstruct Dwarf_Macro_s 345b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper{ 346b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper unsigned int opcode; 347b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwarf_Word param1; 348b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper union 349b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper { 350b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwarf_Word u; 351b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper const char *s; 352b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper } param2; 353b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper}; 354b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 355b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 356b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* We have to include the file at this point because the inline 357b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper functions access internals of the Dwarf structure. */ 358b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#include "memory-access.h" 359b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 360b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 361b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Set error value. */ 362b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperextern void __libdw_seterrno (int value) internal_function; 363b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 364b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 365b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Memory handling, the easy parts. This macro does not do any locking. */ 366db1d54386fc38a30eff030517cbbfedf758fa32aUlrich Drepper#define libdw_alloc(dbg, type, tsize, cnt) \ 367b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper ({ struct libdw_memblock *_tail = (dbg)->mem_tail; \ 368b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper size_t _required = (tsize) * (cnt); \ 369b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper type *_result = (type *) (_tail->mem + (_tail->size - _tail->remaining));\ 370b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper size_t _padding = ((__alignof (type) \ 371b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper - ((uintptr_t) _result & (__alignof (type) - 1))) \ 372b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper & (__alignof (type) - 1)); \ 373b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper if (unlikely (_tail->remaining < _required + _padding)) \ 374c373d850ec9ca342f4c71d5e287c8d8bf0723cd6Roland McGrath _result = (type *) __libdw_allocate (dbg, _required, __alignof (type));\ 375b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper else \ 376b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper { \ 377b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper _required += _padding; \ 378b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper _result = (type *) ((char *) _result + _padding); \ 379c373d850ec9ca342f4c71d5e287c8d8bf0723cd6Roland McGrath _tail->remaining -= _required; \ 380b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper } \ 381b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper _result; }) 382b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 383b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#define libdw_typed_alloc(dbg, type) \ 384b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper libdw_alloc (dbg, type, sizeof (type), 1) 385b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 386b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Callback to allocate more. */ 387c373d850ec9ca342f4c71d5e287c8d8bf0723cd6Roland McGrathextern void *__libdw_allocate (Dwarf *dbg, size_t minsize, size_t align) 388b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper __attribute__ ((__malloc__)) __nonnull_attribute__ (1); 389b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 390b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Default OOM handler. */ 391b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperextern void __libdw_oom (void) __attribute ((noreturn, visibility ("hidden"))); 392b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 393725aad5d2f8b78ed21a5e253fb38f9722c2c8b2dRoland McGrath#if USE_ZLIB 394725aad5d2f8b78ed21a5e253fb38f9722c2c8b2dRoland McGrathextern void __libdw_free_zdata (Dwarf *dwarf) internal_function; 395725aad5d2f8b78ed21a5e253fb38f9722c2c8b2dRoland McGrath#else 396725aad5d2f8b78ed21a5e253fb38f9722c2c8b2dRoland McGrath# define __libdw_free_zdata(dwarf) ((void) (dwarf)) 397725aad5d2f8b78ed21a5e253fb38f9722c2c8b2dRoland McGrath#endif 398725aad5d2f8b78ed21a5e253fb38f9722c2c8b2dRoland McGrath 3993e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath/* Allocate the internal data for a unit not seen before. */ 4003e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrathextern struct Dwarf_CU *__libdw_intern_next_unit (Dwarf *dbg, bool debug_types) 4013e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath __nonnull_attribute__ (1) internal_function; 4023e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath 403b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Find CU for given offset. */ 4042b1f09548b66c2c75d5be6f13cd9374adc95f8d8Roland McGrathextern struct Dwarf_CU *__libdw_findcu (Dwarf *dbg, Dwarf_Off offset, bool tu) 405b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper __nonnull_attribute__ (1) internal_function; 406b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 407b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Return tag of given DIE. */ 408b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperextern Dwarf_Abbrev *__libdw_findabbrev (struct Dwarf_CU *cu, 409b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper unsigned int code) 410b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper __nonnull_attribute__ (1) internal_function; 411b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 412b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Get abbreviation at given offset. */ 413b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperextern Dwarf_Abbrev *__libdw_getabbrev (Dwarf *dbg, struct Dwarf_CU *cu, 414b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwarf_Off offset, size_t *lengthp, 415b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper Dwarf_Abbrev *result) 416b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper __nonnull_attribute__ (1) internal_function; 417b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 418b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Helper functions for form handling. */ 419b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperextern size_t __libdw_form_val_len (Dwarf *dbg, struct Dwarf_CU *cu, 420b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper unsigned int form, 421b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper const unsigned char *valp) 422b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper __nonnull_attribute__ (1, 2, 4) internal_function; 423b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 424e4c22ea004c02a58f5db5eb53794275344c17958Roland McGrath/* Helper function for DW_FORM_ref* handling. */ 425e4c22ea004c02a58f5db5eb53794275344c17958Roland McGrathextern int __libdw_formref (Dwarf_Attribute *attr, Dwarf_Off *return_offset) 426e4c22ea004c02a58f5db5eb53794275344c17958Roland McGrath __nonnull_attribute__ (1, 2) internal_function; 427e4c22ea004c02a58f5db5eb53794275344c17958Roland McGrath 428e4c22ea004c02a58f5db5eb53794275344c17958Roland McGrath 429b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Helper function to locate attribute. */ 430b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperextern unsigned char *__libdw_find_attr (Dwarf_Die *die, 431b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper unsigned int search_name, 432b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper unsigned int *codep, 433b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper unsigned int *formp) 434b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper __nonnull_attribute__ (1) internal_function; 435b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 436b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Helper function to access integer attribute. */ 4376724c90d02659f7466b67b357563042e403d154eRoland McGrathextern int __libdw_attr_intval (Dwarf_Die *die, int *valp, int attval) 438b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper __nonnull_attribute__ (1, 2) internal_function; 439b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 4401ecb606f5af22838bf42b50dcc581d2b0f9191feRoland McGrath/* Helper function to walk scopes. */ 44171e15a01742e5d5de9c6260d4526146be54e5a8aRoland McGrathstruct Dwarf_Die_Chain 44271e15a01742e5d5de9c6260d4526146be54e5a8aRoland McGrath{ 44371e15a01742e5d5de9c6260d4526146be54e5a8aRoland McGrath Dwarf_Die die; 44471e15a01742e5d5de9c6260d4526146be54e5a8aRoland McGrath struct Dwarf_Die_Chain *parent; 44571e15a01742e5d5de9c6260d4526146be54e5a8aRoland McGrath bool prune; /* The PREVISIT function can set this. */ 44671e15a01742e5d5de9c6260d4526146be54e5a8aRoland McGrath}; 44771e15a01742e5d5de9c6260d4526146be54e5a8aRoland McGrathextern int __libdw_visit_scopes (unsigned int depth, 44871e15a01742e5d5de9c6260d4526146be54e5a8aRoland McGrath struct Dwarf_Die_Chain *root, 44971e15a01742e5d5de9c6260d4526146be54e5a8aRoland McGrath int (*previsit) (unsigned int depth, 45071e15a01742e5d5de9c6260d4526146be54e5a8aRoland McGrath struct Dwarf_Die_Chain *, 45171e15a01742e5d5de9c6260d4526146be54e5a8aRoland McGrath void *arg), 45271e15a01742e5d5de9c6260d4526146be54e5a8aRoland McGrath int (*postvisit) (unsigned int depth, 45371e15a01742e5d5de9c6260d4526146be54e5a8aRoland McGrath struct Dwarf_Die_Chain *, 45471e15a01742e5d5de9c6260d4526146be54e5a8aRoland McGrath void *arg), 4551ecb606f5af22838bf42b50dcc581d2b0f9191feRoland McGrath void *arg) 4561ecb606f5af22838bf42b50dcc581d2b0f9191feRoland McGrath __nonnull_attribute__ (2, 3) internal_function; 4571ecb606f5af22838bf42b50dcc581d2b0f9191feRoland McGrath 4583c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath/* Parse a DWARF Dwarf_Block into an array of Dwarf_Op's, 4593c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath and cache the result (via tsearch). */ 4603c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrathextern int __libdw_intern_expression (Dwarf *dbg, 4613c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath bool other_byte_order, 4623c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath unsigned int address_size, 463688f7fcdb395cefef6a098b5ac9ddd167bb5fc3dRoland McGrath unsigned int ref_size, 4643c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath void **cache, const Dwarf_Block *block, 4650ab97839da3c382ab8799ebdbf5eb0a79bf20bdcRoland McGrath bool cfap, bool valuep, 4663c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath Dwarf_Op **llbuf, size_t *listlen, 4673c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath int sec_index) 468688f7fcdb395cefef6a098b5ac9ddd167bb5fc3dRoland McGrath __nonnull_attribute__ (5, 6, 9, 10) internal_function; 4693c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath 470932585d2385c9d4e5686e4ddc9ba30c68172d7f3Roland McGrathextern Dwarf_Die *__libdw_offdie (Dwarf *dbg, Dwarf_Off offset, 471932585d2385c9d4e5686e4ddc9ba30c68172d7f3Roland McGrath Dwarf_Die *result, bool debug_types) 472932585d2385c9d4e5686e4ddc9ba30c68172d7f3Roland McGrath internal_function; 473932585d2385c9d4e5686e4ddc9ba30c68172d7f3Roland McGrath 4743c84db3b4b610bf636c4363abb6d3dac5ae020f9Roland McGrath 475b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Return error code of last failing function call. This value is kept 476b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper separately for each thread. */ 477b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepperextern int __dwarf_errno_internal (void); 478b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 479b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 48099d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper/* Reader hooks. */ 48199d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper 48299d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper/* Relocation hooks return -1 on error (in that case the error code 48399d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper must already have been set), 0 if there is no relocation and 1 if a 48499d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper relocation was present.*/ 48599d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper 48699d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepperstatic inline int 48799d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper__libdw_relocate_address (Dwarf *dbg __attribute__ ((unused)), 48899d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper int sec_index __attribute__ ((unused)), 48999d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper const void *addr __attribute__ ((unused)), 49099d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper int width __attribute__ ((unused)), 49199d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper Dwarf_Addr *val __attribute__ ((unused))) 49299d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper{ 49399d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper return 0; 49499d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper} 49599d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper 49699d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepperstatic inline int 49799d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper__libdw_relocate_offset (Dwarf *dbg __attribute__ ((unused)), 49899d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper int sec_index __attribute__ ((unused)), 49999d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper const void *addr __attribute__ ((unused)), 50099d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper int width __attribute__ ((unused)), 50199d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper Dwarf_Off *val __attribute__ ((unused))) 50299d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper{ 50399d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper return 0; 50499d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper} 50599d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper 50699d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepperstatic inline Elf_Data * 50799d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper__libdw_checked_get_data (Dwarf *dbg, int sec_index) 50899d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper{ 50999d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper Elf_Data *data = dbg->sectiondata[sec_index]; 51099d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper if (unlikely (data == NULL) 51199d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper || unlikely (data->d_buf == NULL)) 51299d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper { 51399d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper __libdw_seterrno (DWARF_E_INVALID_DWARF); 51499d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper return NULL; 51599d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper } 51699d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper return data; 51799d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper} 51899d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper 51999d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepperstatic inline int 52099d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper__libdw_offset_in_section (Dwarf *dbg, int sec_index, 52199d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper Dwarf_Off offset, size_t size) 52299d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper{ 52399d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper Elf_Data *data = __libdw_checked_get_data (dbg, sec_index); 52499d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper if (data == NULL) 52599d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper return -1; 52699d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper if (unlikely (offset > data->d_size) 52799d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper || unlikely (data->d_size - offset < size)) 52899d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper { 52999d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper __libdw_seterrno (DWARF_E_INVALID_OFFSET); 53099d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper return -1; 53199d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper } 53299d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper 53399d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper return 0; 53499d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper} 53599d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper 53699d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepperstatic inline bool 53799d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper__libdw_in_section (Dwarf *dbg, int sec_index, 53899d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper const void *addr, size_t size) 53999d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper{ 54099d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper Elf_Data *data = __libdw_checked_get_data (dbg, sec_index); 54199d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper if (data == NULL) 54299d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper return false; 54399d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper if (unlikely (addr < data->d_buf) 54499d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper || unlikely (data->d_size - (addr - data->d_buf) < size)) 54599d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper { 54699d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper __libdw_seterrno (DWARF_E_INVALID_OFFSET); 54799d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper return false; 54899d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper } 54999d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper 55099d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper return true; 55199d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper} 55299d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper 55399d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper#define READ_AND_RELOCATE(RELOC_HOOK, VAL) \ 55499d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper ({ \ 55599d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper if (!__libdw_in_section (dbg, sec_index, addr, width)) \ 55699d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper return -1; \ 55799d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper \ 55899d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper const unsigned char *orig_addr = addr; \ 55999d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper if (width == 4) \ 56099d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper VAL = read_4ubyte_unaligned_inc (dbg, addr); \ 56199d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper else \ 56299d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper VAL = read_8ubyte_unaligned_inc (dbg, addr); \ 56399d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper \ 56499d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper int status = RELOC_HOOK (dbg, sec_index, orig_addr, width, &VAL); \ 56599d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper if (status < 0) \ 56699d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper return status; \ 56799d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper status > 0; \ 56899d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper }) 56999d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper 57099d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepperstatic inline int 57199d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper__libdw_read_address_inc (Dwarf *dbg, 57205c4e04640d173a4d1ce6e2f25a24060c21a67abRoland McGrath int sec_index, const unsigned char **addrp, 57399d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper int width, Dwarf_Addr *ret) 57499d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper{ 57505c4e04640d173a4d1ce6e2f25a24060c21a67abRoland McGrath const unsigned char *addr = *addrp; 57699d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper READ_AND_RELOCATE (__libdw_relocate_address, (*ret)); 57799d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper *addrp = addr; 57899d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper return 0; 57999d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper} 58099d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper 58199d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepperstatic inline int 58299d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper__libdw_read_address (Dwarf *dbg, 58399d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper int sec_index, const unsigned char *addr, 58499d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper int width, Dwarf_Addr *ret) 58599d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper{ 58699d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper READ_AND_RELOCATE (__libdw_relocate_address, (*ret)); 58799d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper return 0; 58899d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper} 58999d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper 59099d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepperstatic inline int 59199d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper__libdw_read_offset_inc (Dwarf *dbg, 59205c4e04640d173a4d1ce6e2f25a24060c21a67abRoland McGrath int sec_index, const unsigned char **addrp, 59399d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper int width, Dwarf_Off *ret, int sec_ret, 59499d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper size_t size) 59599d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper{ 59605c4e04640d173a4d1ce6e2f25a24060c21a67abRoland McGrath const unsigned char *addr = *addrp; 59799d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper READ_AND_RELOCATE (__libdw_relocate_offset, (*ret)); 59899d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper *addrp = addr; 59999d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper return __libdw_offset_in_section (dbg, sec_ret, *ret, size); 60099d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper} 60199d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper 60299d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepperstatic inline int 60399d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper__libdw_read_offset (Dwarf *dbg, 60499d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper int sec_index, const unsigned char *addr, 60599d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper int width, Dwarf_Off *ret, int sec_ret, 60699d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper size_t size) 60799d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper{ 60899d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper READ_AND_RELOCATE (__libdw_relocate_offset, (*ret)); 60999d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper return __libdw_offset_in_section (dbg, sec_ret, *ret, size); 61099d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper} 61199d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper 6123e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrathstatic inline size_t 6133e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrathcu_sec_idx (struct Dwarf_CU *cu) 6143e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath{ 6153e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath return cu->type_offset == 0 ? IDX_debug_info : IDX_debug_types; 6163e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath} 6173e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath 6183e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrathstatic inline Elf_Data * 6193e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrathcu_data (struct Dwarf_CU *cu) 6203e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath{ 6213e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath return cu->dbg->sectiondata[cu_sec_idx (cu)]; 6223e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath} 6233e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrath 62499d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper/* Read up begin/end pair and increment read pointer. 62599d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper - If it's normal range record, set up *BEGINP and *ENDP and return 0. 62699d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper - If it's base address selection record, set up *BASEP and return 1. 62799d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper - If it's end of rangelist, don't set anything and return 2 62899d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper - If an error occurs, don't set anything and return <0. */ 62999d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepperint __libdw_read_begin_end_pair_inc (Dwarf *dbg, int sec_index, 63099d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper unsigned char **addr, int width, 63199d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper Dwarf_Addr *beginp, Dwarf_Addr *endp, 63299d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper Dwarf_Addr *basep) 63399d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper internal_function; 63499d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper 63599d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepperunsigned char * __libdw_formptr (Dwarf_Attribute *attr, int sec_index, 63699d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper int err_nodata, unsigned char **endpp, 63799d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper Dwarf_Off *offsetp) 63899d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper internal_function; 63999d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper 64099d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper 64199d2372b25d1231d786b70278478c7a112f2b27cUlrich Drepper 642b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper/* Aliases to avoid PLTs. */ 643ebc5c885e696cdc4961916113c50e1396d8d3d48Roland McGrathINTDECL (dwarf_aggregate_size) 644b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwarf_attr) 645b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwarf_attr_integrate) 646b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwarf_begin_elf) 647b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwarf_child) 648b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwarf_dieoffset) 64971e15a01742e5d5de9c6260d4526146be54e5a8aRoland McGrathINTDECL (dwarf_diename) 6504959bf89d92b59ba72bea5786d7b3f9b5564f750Roland McGrathINTDECL (dwarf_end) 65107d4f2fc1cb53f170a71bc13617bbdd9cb1c3c60Roland McGrathINTDECL (dwarf_entrypc) 6524959bf89d92b59ba72bea5786d7b3f9b5564f750Roland McGrathINTDECL (dwarf_errmsg) 653b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwarf_formaddr) 654b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwarf_formblock) 655b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwarf_formref_die) 656b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwarf_formsdata) 657b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwarf_formstring) 658b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwarf_formudata) 659b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwarf_getarange_addr) 660b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwarf_getarangeinfo) 661b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwarf_getaranges) 662b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwarf_getsrcfiles) 663b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwarf_getsrclines) 664b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwarf_hasattr) 665b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwarf_haschildren) 666b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwarf_haspc) 667b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwarf_highpc) 668b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwarf_lowpc) 669b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwarf_nextcu) 6703e0f7d1d1b817040cef82f41879f471ab59b663eRoland McGrathINTDECL (dwarf_next_unit) 671b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwarf_offdie) 67207d4f2fc1cb53f170a71bc13617bbdd9cb1c3c60Roland McGrathINTDECL (dwarf_ranges) 673b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwarf_siblingof) 674ebc5c885e696cdc4961916113c50e1396d8d3d48Roland McGrathINTDECL (dwarf_srclang) 675b08d5a8fb42f4586d756068065186b5af7e48daUlrich DrepperINTDECL (dwarf_tag) 676b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper 677b08d5a8fb42f4586d756068065186b5af7e48daUlrich Drepper#endif /* libdwP.h */ 678