1 /* 2 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 3 * Use is subject to license terms. 4 */ 5 6 /* 7 Copyright (C) 2000, 2001, 2002 Silicon Graphics, Inc. All Rights Reserved. 8 9 This program is free software; you can redistribute it and/or modify it 10 under the terms of version 2.1 of the GNU Lesser General Public License 11 as published by the Free Software Foundation. 12 13 This program is distributed in the hope that it would be useful, but 14 WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 17 Further, this software is distributed without any warranty that it is 18 free of the rightful claim of any third person regarding infringement 19 or the like. Any license provided herein, whether implied or 20 otherwise, applies only to this software file. Patent licenses, if 21 any, provided herein do not apply to combinations of this program with 22 other software, or any other product whatsoever. 23 24 You should have received a copy of the GNU Lesser General Public 25 License along with this program; if not, write the Free Software 26 Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 27 USA. 28 29 Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky, 30 Mountain View, CA 94043, or: 31 32 http://www.sgi.com 33 34 For further information regarding this notice, see: 35 36 http://oss.sgi.com/projects/GenInfo/NoticeExplan 37 38 */ 39 40 41 #ifndef _LIBDWARF_H 42 #define _LIBDWARF_H 43 #ifdef __cplusplus 44 extern "C" { 45 #endif 46 /* 47 libdwarf.h 48 $Revision: 1.74 $ $Date: 2002/06/11 17:49:06 $ 49 50 For libdwarf producers and consumers 51 52 The interface is defined as having 8-byte signed and unsigned 53 values so it can handle 64-or-32bit target on 64-or-32bit host. 54 Addr is the native size: it represents pointers on 55 the host machine (not the target!). 56 57 This contains declarations for types and all producer 58 and consumer functions. 59 60 Function declarations are written on a single line each here 61 so one can use grep to each declaration in its entirety. 62 The declarations are a little harder to read this way, but... 63 64 */ 65 66 #ifdef __SGI_FAST_LIBELF 67 struct elf_sgi; 68 typedef struct elf_sgi* dwarf_elf_handle; 69 #else 70 struct Elf; 71 typedef struct Elf* dwarf_elf_handle; 72 #endif 73 74 #if (_MIPS_SZLONG == 64) 75 /* Special case for MIPS, so -64 (LP64) build gets simple -long-. 76 Non-MIPS LP64 or ILP64 environments should probably ensure 77 _MIPS_SZLONG set to 64 everywhere this header is #included. 78 */ 79 typedef int Dwarf_Bool; /* boolean type */ 80 typedef unsigned long Dwarf_Off; /* 4 or 8 byte file offset */ 81 typedef unsigned long Dwarf_Unsigned; /* 4 or 8 byte unsigned value */ 82 typedef unsigned short Dwarf_Half; /* 2 byte unsigned value */ 83 typedef unsigned char Dwarf_Small; /* 1 byte unsigned value */ 84 typedef signed long Dwarf_Signed; /* 4 or 8 byte signed value */ 85 typedef unsigned long Dwarf_Addr; /* target memory address */ 86 #else /* 32-bit */ 87 /* This is for ILP32, allowing i/o of 64bit dwarf info. 88 Also should be fine for LP64 and ILP64 cases. 89 */ 90 typedef int Dwarf_Bool; /* boolean type */ 91 typedef unsigned long long Dwarf_Off; /* 8 byte file offset */ 92 typedef unsigned long long Dwarf_Unsigned; /* 8 byte unsigned value*/ 93 typedef unsigned short Dwarf_Half; /* 2 byte unsigned value */ 94 typedef unsigned char Dwarf_Small; /* 1 byte unsigned value */ 95 typedef signed long long Dwarf_Signed; /* 8 byte signed value */ 96 typedef unsigned long long Dwarf_Addr; /* target memory address */ 97 #endif 98 typedef void* Dwarf_Ptr; /* host machine pointer */ 99 100 /* Contains info on an uninterpreted block of data 101 */ 102 typedef struct { 103 Dwarf_Unsigned bl_len; /* length of block */ 104 Dwarf_Ptr bl_data; /* uninterpreted data */ 105 Dwarf_Small bl_from_loclist; /*non-0 if loclist, else debug_info*/ 106 Dwarf_Unsigned bl_section_offset; /* Section (not CU) offset 107 which 'data' comes from. */ 108 } Dwarf_Block; 109 110 111 /* location record 112 */ 113 typedef struct { 114 Dwarf_Small lr_atom; /* location operation */ 115 Dwarf_Unsigned lr_number; /* operand */ 116 Dwarf_Unsigned lr_number2; /* for OP_BREGx */ 117 Dwarf_Unsigned lr_offset; /* offset in locexpr for OP_BRA etc */ 118 } Dwarf_Loc; 119 120 121 /* location description 122 */ 123 typedef struct { 124 Dwarf_Addr ld_lopc; /* beginning of active range */ 125 Dwarf_Addr ld_hipc; /* end of active range */ 126 Dwarf_Half ld_cents; /* count of location records */ 127 Dwarf_Loc* ld_s; /* pointer to list of same */ 128 Dwarf_Small ld_from_loclist; 129 /* non-0 if loclist, else debug_info*/ 130 131 Dwarf_Unsigned ld_section_offset; /* Section (not CU) offset 132 where loc-expr begins*/ 133 } Dwarf_Locdesc; 134 135 /* Frame description instructions expanded. 136 */ 137 typedef struct { 138 Dwarf_Small fp_base_op; 139 Dwarf_Small fp_extended_op; 140 Dwarf_Half fp_register; 141 Dwarf_Unsigned fp_offset; 142 Dwarf_Off fp_instr_offset; 143 } Dwarf_Frame_Op; 144 145 /* DW_REG_TABLE_SIZE must reflect the number of registers 146 *(DW_FRAME_LAST_REG_NUM) as defined in dwarf.h 147 */ 148 #define DW_REG_TABLE_SIZE 66 149 typedef struct { 150 struct { 151 Dwarf_Small dw_offset_relevant; 152 Dwarf_Half dw_regnum; 153 Dwarf_Addr dw_offset; 154 } rules[DW_REG_TABLE_SIZE]; 155 } Dwarf_Regtable; 156 157 /* for DW_DLC_SYMBOLIC_RELOCATIONS output to caller 158 v2, adding drd_length: some relocations are 4 and 159 some 8 bytes (pointers are 8, section offsets 4) in 160 some dwarf environments. (MIPS relocations are all one 161 size in any given ABI.) Changing drd_type to an unsigned char 162 to keep struct size down. 163 */ 164 enum Dwarf_Rel_Type { 165 dwarf_drt_none, /* should not get to caller */ 166 dwarf_drt_data_reloc, /* simple normal relocation */ 167 dwarf_drt_segment_rel, /* special reloc, exceptions*/ 168 dwarf_drt_first_of_length_pair,/* this and drt_second 169 for .word end - begin 170 case */ 171 dwarf_drt_second_of_length_pair 172 }; 173 typedef struct Dwarf_Relocation_Data_s * Dwarf_Relocation_Data; 174 struct Dwarf_Relocation_Data_s { 175 unsigned char drd_type; /* cast to/from Dwarf_Rel_Type 176 to keep size small in struct */ 177 unsigned char drd_length; /* length in bytes 178 of data being relocated. 4 for 32bit. 179 8 for 64bit data */ 180 Dwarf_Unsigned drd_offset; /* where the data to reloc is */ 181 Dwarf_Unsigned drd_symbol_index; 182 }; 183 184 /* Opaque types for Consumer Library. */ 185 typedef struct Dwarf_Debug_s* Dwarf_Debug; 186 typedef struct Dwarf_Die_s* Dwarf_Die; 187 typedef struct Dwarf_Line_s* Dwarf_Line; 188 typedef struct Dwarf_Global_s* Dwarf_Global; 189 typedef struct Dwarf_Func_s* Dwarf_Func; 190 typedef struct Dwarf_Type_s* Dwarf_Type; 191 typedef struct Dwarf_Var_s* Dwarf_Var; 192 typedef struct Dwarf_Weak_s* Dwarf_Weak; 193 typedef struct Dwarf_Error_s* Dwarf_Error; 194 typedef struct Dwarf_Attribute_s* Dwarf_Attribute; 195 typedef struct Dwarf_Abbrev_s* Dwarf_Abbrev; 196 typedef struct Dwarf_Fde_s* Dwarf_Fde; 197 typedef struct Dwarf_Cie_s* Dwarf_Cie; 198 typedef struct Dwarf_Arange_s* Dwarf_Arange; 199 200 /* Opaque types for Producer Library. */ 201 typedef struct Dwarf_P_Debug_s* Dwarf_P_Debug; 202 typedef struct Dwarf_P_Die_s* Dwarf_P_Die; 203 typedef struct Dwarf_P_Attribute_s* Dwarf_P_Attribute; 204 typedef struct Dwarf_P_Fde_s* Dwarf_P_Fde; 205 typedef struct Dwarf_P_Expr_s* Dwarf_P_Expr; 206 typedef Dwarf_Unsigned Dwarf_Tag; 207 208 209 /* error handler function 210 */ 211 typedef void (*Dwarf_Handler)(Dwarf_Error /*error*/, Dwarf_Ptr /*errarg*/); 212 213 214 /* 215 Dwarf_dealloc() alloc_type arguments. 216 Argument points to: 217 */ 218 #define DW_DLA_STRING 0x01 /* char* */ 219 #define DW_DLA_LOC 0x02 /* Dwarf_Loc */ 220 #define DW_DLA_LOCDESC 0x03 /* Dwarf_Locdesc */ 221 #define DW_DLA_ELLIST 0x04 /* Dwarf_Ellist (not used)*/ 222 #define DW_DLA_BOUNDS 0x05 /* Dwarf_Bounds (not used) */ 223 #define DW_DLA_BLOCK 0x06 /* Dwarf_Block */ 224 #define DW_DLA_DEBUG 0x07 /* Dwarf_Debug */ 225 #define DW_DLA_DIE 0x08 /* Dwarf_Die */ 226 #define DW_DLA_LINE 0x09 /* Dwarf_Line */ 227 #define DW_DLA_ATTR 0x0a /* Dwarf_Attribute */ 228 #define DW_DLA_TYPE 0x0b /* Dwarf_Type (not used) */ 229 #define DW_DLA_SUBSCR 0x0c /* Dwarf_Subscr (not used) */ 230 #define DW_DLA_GLOBAL 0x0d /* Dwarf_Global */ 231 #define DW_DLA_ERROR 0x0e /* Dwarf_Error */ 232 #define DW_DLA_LIST 0x0f /* a list */ 233 #define DW_DLA_LINEBUF 0x10 /* Dwarf_Line* (not used) */ 234 #define DW_DLA_ARANGE 0x11 /* Dwarf_Arange */ 235 #define DW_DLA_ABBREV 0x12 /* Dwarf_Abbrev */ 236 #define DW_DLA_FRAME_OP 0x13 /* Dwarf_Frame_Op */ 237 #define DW_DLA_CIE 0x14 /* Dwarf_Cie */ 238 #define DW_DLA_FDE 0x15 /* Dwarf_Fde */ 239 #define DW_DLA_LOC_BLOCK 0x16 /* Dwarf_Loc Block (not used) */ 240 #define DW_DLA_FRAME_BLOCK 0x17 /* Dwarf_Frame Block (not used) */ 241 #define DW_DLA_FUNC 0x18 /* Dwarf_Func */ 242 #define DW_DLA_TYPENAME 0x19 /* Dwarf_Type */ 243 #define DW_DLA_VAR 0x1a /* Dwarf_Var */ 244 #define DW_DLA_WEAK 0x1b /* Dwarf_Weak */ 245 #define DW_DLA_ADDR 0x1c /* Dwarf_Addr sized entries */ 246 247 /* The augmenter string for CIE */ 248 #define DW_CIE_AUGMENTER_STRING_V0 "z" 249 250 /* dwarf_init() access arguments 251 */ 252 #define DW_DLC_READ 0 /* read only access */ 253 #define DW_DLC_WRITE 1 /* write only access */ 254 #define DW_DLC_RDWR 2 /* read/write access NOT SUPPORTED*/ 255 256 /* dwarf_init() access flag modifiers 257 */ 258 #define DW_DLC_SIZE_64 0x40000000 /* 32-bit target */ 259 #define DW_DLC_SIZE_32 0x20000000 /* 64-bit target */ 260 261 /* dwarf_init() access flag modifiers 262 */ 263 #define DW_DLC_ISA_MIPS 0x00000000 /* MIPS target */ 264 #define DW_DLC_ISA_IA64 0x01000000 /* IA64 target */ 265 #define DW_DLC_STREAM_RELOCATIONS 0x02000000 /* old style binary relocs */ 266 #define DW_DLC_SYMBOLIC_RELOCATIONS 0x04000000 /* usable with assem output */ 267 #define DW_DLC_TARGET_BIGENDIAN 0x08000000 /* big endian target */ 268 #define DW_DLC_TARGET_LITTLEENDIAN 0x00100000 /* little endian target */ 269 270 /* dwarf_pcline() slide arguments 271 */ 272 #define DW_DLS_BACKWARD -1 /* slide backward to find line */ 273 #define DW_DLS_NOSLIDE 0 /* match exactly without sliding */ 274 #define DW_DLS_FORWARD 1 /* slide forward to find line */ 275 276 /* libdwarf error numbers 277 */ 278 #define DW_DLE_NE 0 /* no error */ 279 #define DW_DLE_VMM 1 /* dwarf format/library version mismatch */ 280 #define DW_DLE_MAP 2 /* memory map failure */ 281 #define DW_DLE_LEE 3 /* libelf error */ 282 #define DW_DLE_NDS 4 /* no debug section */ 283 #define DW_DLE_NLS 5 /* no line section */ 284 #define DW_DLE_ID 6 /* invalid descriptor for query */ 285 #define DW_DLE_IOF 7 /* I/O failure */ 286 #define DW_DLE_MAF 8 /* memory allocation failure */ 287 #define DW_DLE_IA 9 /* invalid argument */ 288 #define DW_DLE_MDE 10 /* mangled debugging entry */ 289 #define DW_DLE_MLE 11 /* mangled line number entry */ 290 #define DW_DLE_FNO 12 /* file not open */ 291 #define DW_DLE_FNR 13 /* file not a regular file */ 292 #define DW_DLE_FWA 14 /* file open with wrong access */ 293 #define DW_DLE_NOB 15 /* not an object file */ 294 #define DW_DLE_MOF 16 /* mangled object file header */ 295 #define DW_DLE_EOLL 17 /* end of location list entries */ 296 #define DW_DLE_NOLL 18 /* no location list section */ 297 #define DW_DLE_BADOFF 19 /* Invalid offset */ 298 #define DW_DLE_EOS 20 /* end of section */ 299 #define DW_DLE_ATRUNC 21 /* abbreviations section appears truncated*/ 300 #define DW_DLE_BADBITC 22 /* Address size passed to dwarf bad*/ 301 /* It is not an allowed size (64 or 32) */ 302 /* Error codes defined by the current Libdwarf Implementation. */ 303 #define DW_DLE_DBG_ALLOC 23 304 #define DW_DLE_FSTAT_ERROR 24 305 #define DW_DLE_FSTAT_MODE_ERROR 25 306 #define DW_DLE_INIT_ACCESS_WRONG 26 307 #define DW_DLE_ELF_BEGIN_ERROR 27 308 #define DW_DLE_ELF_GETEHDR_ERROR 28 309 #define DW_DLE_ELF_GETSHDR_ERROR 29 310 #define DW_DLE_ELF_STRPTR_ERROR 30 311 #define DW_DLE_DEBUG_INFO_DUPLICATE 31 312 #define DW_DLE_DEBUG_INFO_NULL 32 313 #define DW_DLE_DEBUG_ABBREV_DUPLICATE 33 314 #define DW_DLE_DEBUG_ABBREV_NULL 34 315 #define DW_DLE_DEBUG_ARANGES_DUPLICATE 35 316 #define DW_DLE_DEBUG_ARANGES_NULL 36 317 #define DW_DLE_DEBUG_LINE_DUPLICATE 37 318 #define DW_DLE_DEBUG_LINE_NULL 38 319 #define DW_DLE_DEBUG_LOC_DUPLICATE 39 320 #define DW_DLE_DEBUG_LOC_NULL 40 321 #define DW_DLE_DEBUG_MACINFO_DUPLICATE 41 322 #define DW_DLE_DEBUG_MACINFO_NULL 42 323 #define DW_DLE_DEBUG_PUBNAMES_DUPLICATE 43 324 #define DW_DLE_DEBUG_PUBNAMES_NULL 44 325 #define DW_DLE_DEBUG_STR_DUPLICATE 45 326 #define DW_DLE_DEBUG_STR_NULL 46 327 #define DW_DLE_CU_LENGTH_ERROR 47 328 #define DW_DLE_VERSION_STAMP_ERROR 48 329 #define DW_DLE_ABBREV_OFFSET_ERROR 49 330 #define DW_DLE_ADDRESS_SIZE_ERROR 50 331 #define DW_DLE_DEBUG_INFO_PTR_NULL 51 332 #define DW_DLE_DIE_NULL 52 333 #define DW_DLE_STRING_OFFSET_BAD 53 334 #define DW_DLE_DEBUG_LINE_LENGTH_BAD 54 335 #define DW_DLE_LINE_PROLOG_LENGTH_BAD 55 336 #define DW_DLE_LINE_NUM_OPERANDS_BAD 56 337 #define DW_DLE_LINE_SET_ADDR_ERROR 57 338 #define DW_DLE_LINE_EXT_OPCODE_BAD 58 339 #define DW_DLE_DWARF_LINE_NULL 59 340 #define DW_DLE_INCL_DIR_NUM_BAD 60 341 #define DW_DLE_LINE_FILE_NUM_BAD 61 342 #define DW_DLE_ALLOC_FAIL 62 343 #define DW_DLE_NO_CALLBACK_FUNC 63 344 #define DW_DLE_SECT_ALLOC 64 345 #define DW_DLE_FILE_ENTRY_ALLOC 65 346 #define DW_DLE_LINE_ALLOC 66 347 #define DW_DLE_FPGM_ALLOC 67 348 #define DW_DLE_INCDIR_ALLOC 68 349 #define DW_DLE_STRING_ALLOC 69 350 #define DW_DLE_CHUNK_ALLOC 70 351 #define DW_DLE_BYTEOFF_ERR 71 352 #define DW_DLE_CIE_ALLOC 72 353 #define DW_DLE_FDE_ALLOC 73 354 #define DW_DLE_REGNO_OVFL 74 355 #define DW_DLE_CIE_OFFS_ALLOC 75 356 #define DW_DLE_WRONG_ADDRESS 76 357 #define DW_DLE_EXTRA_NEIGHBORS 77 358 #define DW_DLE_WRONG_TAG 78 359 #define DW_DLE_DIE_ALLOC 79 360 #define DW_DLE_PARENT_EXISTS 80 361 #define DW_DLE_DBG_NULL 81 362 #define DW_DLE_DEBUGLINE_ERROR 82 363 #define DW_DLE_DEBUGFRAME_ERROR 83 364 #define DW_DLE_DEBUGINFO_ERROR 84 365 #define DW_DLE_ATTR_ALLOC 85 366 #define DW_DLE_ABBREV_ALLOC 86 367 #define DW_DLE_OFFSET_UFLW 87 368 #define DW_DLE_ELF_SECT_ERR 88 369 #define DW_DLE_DEBUG_FRAME_LENGTH_BAD 89 370 #define DW_DLE_FRAME_VERSION_BAD 90 371 #define DW_DLE_CIE_RET_ADDR_REG_ERROR 91 372 #define DW_DLE_FDE_NULL 92 373 #define DW_DLE_FDE_DBG_NULL 93 374 #define DW_DLE_CIE_NULL 94 375 #define DW_DLE_CIE_DBG_NULL 95 376 #define DW_DLE_FRAME_TABLE_COL_BAD 96 377 #define DW_DLE_PC_NOT_IN_FDE_RANGE 97 378 #define DW_DLE_CIE_INSTR_EXEC_ERROR 98 379 #define DW_DLE_FRAME_INSTR_EXEC_ERROR 99 380 #define DW_DLE_FDE_PTR_NULL 100 381 #define DW_DLE_RET_OP_LIST_NULL 101 382 #define DW_DLE_LINE_CONTEXT_NULL 102 383 #define DW_DLE_DBG_NO_CU_CONTEXT 103 384 #define DW_DLE_DIE_NO_CU_CONTEXT 104 385 #define DW_DLE_FIRST_DIE_NOT_CU 105 386 #define DW_DLE_NEXT_DIE_PTR_NULL 106 387 #define DW_DLE_DEBUG_FRAME_DUPLICATE 107 388 #define DW_DLE_DEBUG_FRAME_NULL 108 389 #define DW_DLE_ABBREV_DECODE_ERROR 109 390 #define DW_DLE_DWARF_ABBREV_NULL 110 391 #define DW_DLE_ATTR_NULL 111 392 #define DW_DLE_DIE_BAD 112 393 #define DW_DLE_DIE_ABBREV_BAD 113 394 #define DW_DLE_ATTR_FORM_BAD 114 395 #define DW_DLE_ATTR_NO_CU_CONTEXT 115 396 #define DW_DLE_ATTR_FORM_SIZE_BAD 116 397 #define DW_DLE_ATTR_DBG_NULL 117 398 #define DW_DLE_BAD_REF_FORM 118 399 #define DW_DLE_ATTR_FORM_OFFSET_BAD 119 400 #define DW_DLE_LINE_OFFSET_BAD 120 401 #define DW_DLE_DEBUG_STR_OFFSET_BAD 121 402 #define DW_DLE_STRING_PTR_NULL 122 403 #define DW_DLE_PUBNAMES_VERSION_ERROR 123 404 #define DW_DLE_PUBNAMES_LENGTH_BAD 124 405 #define DW_DLE_GLOBAL_NULL 125 406 #define DW_DLE_GLOBAL_CONTEXT_NULL 126 407 #define DW_DLE_DIR_INDEX_BAD 127 408 #define DW_DLE_LOC_EXPR_BAD 128 409 #define DW_DLE_DIE_LOC_EXPR_BAD 129 410 #define DW_DLE_ADDR_ALLOC 130 411 #define DW_DLE_OFFSET_BAD 131 412 #define DW_DLE_MAKE_CU_CONTEXT_FAIL 132 413 #define DW_DLE_REL_ALLOC 133 414 #define DW_DLE_ARANGE_OFFSET_BAD 134 415 #define DW_DLE_SEGMENT_SIZE_BAD 135 416 #define DW_DLE_ARANGE_LENGTH_BAD 136 417 #define DW_DLE_ARANGE_DECODE_ERROR 137 418 #define DW_DLE_ARANGES_NULL 138 419 #define DW_DLE_ARANGE_NULL 139 420 #define DW_DLE_NO_FILE_NAME 140 421 #define DW_DLE_NO_COMP_DIR 141 422 #define DW_DLE_CU_ADDRESS_SIZE_BAD 142 423 #define DW_DLE_INPUT_ATTR_BAD 143 424 #define DW_DLE_EXPR_NULL 144 425 #define DW_DLE_BAD_EXPR_OPCODE 145 426 #define DW_DLE_EXPR_LENGTH_BAD 146 427 #define DW_DLE_MULTIPLE_RELOC_IN_EXPR 147 428 #define DW_DLE_ELF_GETIDENT_ERROR 148 429 #define DW_DLE_NO_AT_MIPS_FDE 149 430 #define DW_DLE_NO_CIE_FOR_FDE 150 431 #define DW_DLE_DIE_ABBREV_LIST_NULL 151 432 #define DW_DLE_DEBUG_FUNCNAMES_DUPLICATE 152 433 #define DW_DLE_DEBUG_FUNCNAMES_NULL 153 434 #define DW_DLE_DEBUG_FUNCNAMES_VERSION_ERROR 154 435 #define DW_DLE_DEBUG_FUNCNAMES_LENGTH_BAD 155 436 #define DW_DLE_FUNC_NULL 156 437 #define DW_DLE_FUNC_CONTEXT_NULL 157 438 #define DW_DLE_DEBUG_TYPENAMES_DUPLICATE 158 439 #define DW_DLE_DEBUG_TYPENAMES_NULL 159 440 #define DW_DLE_DEBUG_TYPENAMES_VERSION_ERROR 160 441 #define DW_DLE_DEBUG_TYPENAMES_LENGTH_BAD 161 442 #define DW_DLE_TYPE_NULL 162 443 #define DW_DLE_TYPE_CONTEXT_NULL 163 444 #define DW_DLE_DEBUG_VARNAMES_DUPLICATE 164 445 #define DW_DLE_DEBUG_VARNAMES_NULL 165 446 #define DW_DLE_DEBUG_VARNAMES_VERSION_ERROR 166 447 #define DW_DLE_DEBUG_VARNAMES_LENGTH_BAD 167 448 #define DW_DLE_VAR_NULL 168 449 #define DW_DLE_VAR_CONTEXT_NULL 169 450 #define DW_DLE_DEBUG_WEAKNAMES_DUPLICATE 170 451 #define DW_DLE_DEBUG_WEAKNAMES_NULL 171 452 #define DW_DLE_DEBUG_WEAKNAMES_VERSION_ERROR 172 453 #define DW_DLE_DEBUG_WEAKNAMES_LENGTH_BAD 173 454 #define DW_DLE_WEAK_NULL 174 455 #define DW_DLE_WEAK_CONTEXT_NULL 175 456 #define DW_DLE_LOCDESC_COUNT_WRONG 176 457 #define DW_DLE_MACINFO_STRING_NULL 177 458 #define DW_DLE_MACINFO_STRING_EMPTY 178 459 #define DW_DLE_MACINFO_INTERNAL_ERROR_SPACE 179 460 #define DW_DLE_MACINFO_MALLOC_FAIL 180 461 #define DW_DLE_DEBUGMACINFO_ERROR 181 462 #define DW_DLE_DEBUG_MACRO_LENGTH_BAD 182 463 #define DW_DLE_DEBUG_MACRO_MAX_BAD 183 464 #define DW_DLE_DEBUG_MACRO_INTERNAL_ERR 184 465 #define DW_DLE_DEBUG_MACRO_MALLOC_SPACE 185 466 #define DW_DLE_DEBUG_MACRO_INCONSISTENT 186 467 #define DW_DLE_DF_NO_CIE_AUGMENTATION 187 468 #define DW_DLE_DF_REG_NUM_TOO_HIGH 188 469 #define DW_DLE_DF_MAKE_INSTR_NO_INIT 189 470 #define DW_DLE_DF_NEW_LOC_LESS_OLD_LOC 190 471 #define DW_DLE_DF_POP_EMPTY_STACK 191 472 #define DW_DLE_DF_ALLOC_FAIL 192 473 #define DW_DLE_DF_FRAME_DECODING_ERROR 193 474 #define DW_DLE_DEBUG_LOC_SECTION_SHORT 194 475 476 /* DW_DLE_LAST MUST EQUAL LAST ERROR NUMBER */ 477 #define DW_DLE_LAST 194 478 #define DW_DLE_LO_USER 0x10000 479 480 /* taken as meaning 'undefined value', this is not 481 a column or register number. 482 Only present at libdwarf runtime. Never on disk. 483 DW_FRAME_* Values present on disk are in dwarf.h 484 */ 485 #define DW_FRAME_UNDEFINED_VAL 1034 486 487 /* taken as meaning 'same value' as caller had, not a column 488 or register number 489 Only present at libdwarf runtime. Never on disk. 490 DW_FRAME_* Values present on disk are in dwarf.h 491 */ 492 #define DW_FRAME_SAME_VAL 1035 493 494 495 496 /* error return values 497 */ 498 #define DW_DLV_BADADDR (~(Dwarf_Addr)0) 499 /* for functions returning target address */ 500 501 #define DW_DLV_NOCOUNT ((Dwarf_Signed)-1) 502 /* for functions returning count */ 503 504 #define DW_DLV_BADOFFSET (~(Dwarf_Off)0) 505 /* for functions returning offset */ 506 507 /* standard return values for functions */ 508 #define DW_DLV_NO_ENTRY -1 509 #define DW_DLV_OK 0 510 #define DW_DLV_ERROR 1 511 512 /* Special values for offset_into_exception_table field of dwarf fde's. */ 513 /* The following value indicates that there is no Exception table offset 514 associated with a dwarf frame. */ 515 #define DW_DLX_NO_EH_OFFSET (-1LL) 516 /* The following value indicates that the producer was unable to analyse the 517 source file to generate Exception tables for this function. */ 518 #define DW_DLX_EH_OFFSET_UNAVAILABLE (-2LL) 519 520 521 /*===========================================================================*/ 522 /* Dwarf consumer interface initialization and termination operations */ 523 524 /* non-elf initialization */ 525 int dwarf_init(int /*fd*/, 526 Dwarf_Unsigned /*access*/, 527 Dwarf_Handler /*errhand*/, 528 Dwarf_Ptr /*errarg*/, 529 Dwarf_Debug * /*dbg*/, 530 Dwarf_Error* /*error*/); 531 532 /* elf intialization */ 533 int dwarf_elf_init(dwarf_elf_handle /*elf*/, 534 Dwarf_Unsigned /*access*/, 535 Dwarf_Handler /*errhand*/, 536 Dwarf_Ptr /*errarg*/, 537 Dwarf_Debug * /*dbg*/, 538 Dwarf_Error* /*error*/); 539 540 /* Undocumented function for memory allocator. */ 541 void dwarf_print_memory_stats(Dwarf_Debug /*dbg*/); 542 543 544 int dwarf_get_elf(Dwarf_Debug /*dbg*/, 545 dwarf_elf_handle* /*return_elfptr*/, 546 Dwarf_Error* /*error*/); 547 548 int dwarf_finish(Dwarf_Debug /*dbg*/, Dwarf_Error* /*error*/); 549 550 /* die traversal operations */ 551 int dwarf_next_cu_header(Dwarf_Debug /*dbg*/, 552 Dwarf_Unsigned* /*cu_header_length*/, 553 Dwarf_Half* /*version_stamp*/, 554 Dwarf_Off* /*abbrev_offset*/, 555 Dwarf_Half* /*address_size*/, 556 Dwarf_Unsigned* /*next_cu_header_offset*/, 557 Dwarf_Error* /*error*/); 558 559 int dwarf_siblingof(Dwarf_Debug /*dbg*/, 560 Dwarf_Die /*die*/, 561 Dwarf_Die* /*return_siblingdie*/, 562 Dwarf_Error* /*error*/); 563 564 int dwarf_child(Dwarf_Die /*die*/, 565 Dwarf_Die* /*return_childdie*/, 566 Dwarf_Error* /*error*/); 567 568 /* finding die given offset */ 569 int dwarf_offdie(Dwarf_Debug /*dbg*/, 570 Dwarf_Off /*offset*/, 571 Dwarf_Die* /*return_die*/, 572 Dwarf_Error* /*error*/); 573 574 /* higher level functions (Unimplemented) */ 575 int dwarf_pcfile(Dwarf_Debug /*dbg*/, 576 Dwarf_Addr /*pc*/, 577 Dwarf_Die* /*return_die*/, 578 Dwarf_Error* /*error*/); 579 580 /* Unimplemented */ 581 int dwarf_pcsubr(Dwarf_Debug /*dbg*/, 582 Dwarf_Addr /*pc*/, 583 Dwarf_Die* /*return_die*/, 584 Dwarf_Error* /*error*/); 585 586 /* Unimplemented */ 587 int dwarf_pcscope(Dwarf_Debug /*dbg*/, 588 Dwarf_Addr /*pc*/, 589 Dwarf_Die* /*return_die*/, 590 Dwarf_Error* /*error*/); 591 592 /* operations on DIEs */ 593 int dwarf_tag(Dwarf_Die /*die*/, 594 Dwarf_Half* /*return_tag*/, 595 Dwarf_Error* /*error*/); 596 597 /* utility? */ 598 int dwarf_dieoffset(Dwarf_Die /*die*/, 599 Dwarf_Off* /*return_offset*/, 600 Dwarf_Error* /*error*/); 601 602 int dwarf_die_CU_offset(Dwarf_Die /*die*/, 603 Dwarf_Off* /*return_offset*/, 604 Dwarf_Error* /*error*/); 605 606 int dwarf_attr (Dwarf_Die /*die*/, 607 Dwarf_Half /*attr*/, 608 Dwarf_Attribute * /*returned_attr*/, 609 Dwarf_Error* /*error*/); 610 611 int dwarf_diename(Dwarf_Die /*die*/, 612 char ** /*diename*/, 613 Dwarf_Error* /*error*/); 614 615 /* convenience functions, alternative to using dwarf_attrlist() */ 616 int dwarf_hasattr(Dwarf_Die /*die*/, 617 Dwarf_Half /*attr*/, 618 Dwarf_Bool * /*returned_bool*/, 619 Dwarf_Error* /*error*/); 620 621 /* dwarf_loclist_n preferred over dwarf_loclist */ 622 int dwarf_loclist_n(Dwarf_Attribute /*attr*/, 623 Dwarf_Locdesc*** /*llbuf*/, 624 Dwarf_Signed * /*locCount*/, 625 Dwarf_Error* /*error*/); 626 627 int dwarf_loclist(Dwarf_Attribute /*attr*/, /* inflexible! */ 628 Dwarf_Locdesc** /*llbuf*/, 629 Dwarf_Signed * /*locCount*/, 630 Dwarf_Error* /*error*/); 631 632 /* Unimplemented */ 633 int dwarf_stringlen(Dwarf_Die /*die*/, 634 Dwarf_Locdesc ** /*returned_locdesc*/, 635 Dwarf_Error* /*error*/); 636 637 /* Unimplemented */ 638 int dwarf_subscrcnt(Dwarf_Die /*die*/, 639 Dwarf_Signed * /*returned_count*/, 640 Dwarf_Error* /*error*/); 641 642 /* Unimplemented */ 643 int dwarf_nthsubscr(Dwarf_Die /*die*/, 644 Dwarf_Unsigned /*ssndx*/, 645 Dwarf_Die * /*returned_die*/, 646 Dwarf_Error* /*error*/); 647 648 int dwarf_lowpc(Dwarf_Die /*die*/, 649 Dwarf_Addr * /*returned_addr*/, 650 Dwarf_Error* /*error*/); 651 652 int dwarf_highpc(Dwarf_Die /*die*/, 653 Dwarf_Addr * /*returned_addr*/, 654 Dwarf_Error* /*error*/); 655 656 int dwarf_bytesize(Dwarf_Die /*die*/, 657 Dwarf_Unsigned * /*returned_size*/, 658 Dwarf_Error* /*error*/); 659 660 /* Unimplemented */ 661 int dwarf_isbitfield(Dwarf_Die /*die*/, 662 Dwarf_Bool * /*returned_bool*/, 663 Dwarf_Error* /*error*/); 664 665 int dwarf_bitsize(Dwarf_Die /*die*/, 666 Dwarf_Unsigned * /*returned_size*/, 667 Dwarf_Error* /*error*/); 668 669 int dwarf_bitoffset(Dwarf_Die /*die*/, 670 Dwarf_Unsigned * /*returned_offset*/, 671 Dwarf_Error* /*error*/); 672 673 int dwarf_srclang(Dwarf_Die /*die*/, 674 Dwarf_Unsigned * /*returned_lang*/, 675 Dwarf_Error* /*error*/); 676 677 int dwarf_arrayorder(Dwarf_Die /*die*/, 678 Dwarf_Unsigned * /*returned_order*/, 679 Dwarf_Error* /*error*/); 680 681 /* end of convenience function list */ 682 683 /* this is the main interface to attributes of a DIE */ 684 int dwarf_attrlist(Dwarf_Die /*die*/, 685 Dwarf_Attribute** /*attrbuf*/, 686 Dwarf_Signed * /*attrcount*/, 687 Dwarf_Error* /*error*/); 688 689 /* query operations for attributes */ 690 int dwarf_hasform(Dwarf_Attribute /*attr*/, 691 Dwarf_Half /*form*/, 692 Dwarf_Bool * /*returned_bool*/, 693 Dwarf_Error* /*error*/); 694 695 int dwarf_whatform(Dwarf_Attribute /*attr*/, 696 Dwarf_Half * /*returned_form*/, 697 Dwarf_Error* /*error*/); 698 699 int dwarf_whatform_direct(Dwarf_Attribute /*attr*/, 700 Dwarf_Half * /*returned_form*/, 701 Dwarf_Error* /*error*/); 702 703 int dwarf_whatattr(Dwarf_Attribute /*attr*/, 704 Dwarf_Half * /*returned_attr_num*/, 705 Dwarf_Error* /*error*/); 706 707 /* 708 The following are concerned with the Primary Interface: getting 709 the actual data values. One function per 'kind' of FORM. 710 */ 711 /*dwarf_formref returns, thru return_offset, a CU-relative offset 712 ** and does not allow DW_FORM_ref_addr*/ 713 int dwarf_formref(Dwarf_Attribute /*attr*/, 714 Dwarf_Off* /*return_offset*/, 715 Dwarf_Error* /*error*/); 716 /*dwarf_global_formref returns, thru return_offset, 717 a debug_info-relative offset and does allow all reference forms*/ 718 int dwarf_global_formref(Dwarf_Attribute /*attr*/, 719 Dwarf_Off* /*return_offset*/, 720 Dwarf_Error* /*error*/); 721 722 int dwarf_formaddr(Dwarf_Attribute /*attr*/, 723 Dwarf_Addr * /*returned_addr*/, 724 Dwarf_Error* /*error*/); 725 726 int dwarf_formflag(Dwarf_Attribute /*attr*/, 727 Dwarf_Bool * /*returned_bool*/, 728 Dwarf_Error* /*error*/); 729 730 int dwarf_formudata(Dwarf_Attribute /*attr*/, 731 Dwarf_Unsigned * /*returned_val*/, 732 Dwarf_Error* /*error*/); 733 734 int dwarf_formsdata(Dwarf_Attribute /*attr*/, 735 Dwarf_Signed * /*returned_val*/, 736 Dwarf_Error* /*error*/); 737 738 int dwarf_formblock(Dwarf_Attribute /*attr*/, 739 Dwarf_Block ** /*returned_block*/, 740 Dwarf_Error* /*error*/); 741 742 int dwarf_formstring(Dwarf_Attribute /*attr*/, 743 char ** /*returned_string*/, 744 Dwarf_Error* /*error*/); 745 746 /* end attribute query operations. */ 747 748 /* line number operations */ 749 /* dwarf_srclines is the normal interface */ 750 int dwarf_srclines(Dwarf_Die /*die*/, 751 Dwarf_Line** /*linebuf*/, 752 Dwarf_Signed * /*linecount*/, 753 Dwarf_Error* /*error*/); 754 755 int dwarf_srcfiles(Dwarf_Die /*die*/, 756 char*** /*srcfiles*/, 757 Dwarf_Signed * /*filecount*/, 758 Dwarf_Error* /*error*/); 759 760 /* Unimplemented. */ 761 int dwarf_dieline(Dwarf_Die /*die*/, 762 Dwarf_Line * /*returned_line*/, 763 Dwarf_Error * /*error*/); 764 765 int dwarf_linebeginstatement(Dwarf_Line /*line*/, 766 Dwarf_Bool * /*returned_bool*/, 767 Dwarf_Error* /*error*/); 768 769 int dwarf_lineendsequence(Dwarf_Line /*line*/, 770 Dwarf_Bool * /*returned_bool*/, 771 Dwarf_Error* /*error*/); 772 773 int dwarf_lineno(Dwarf_Line /*line*/, 774 Dwarf_Unsigned * /*returned_lineno*/, 775 Dwarf_Error* /*error*/); 776 777 int dwarf_lineaddr(Dwarf_Line /*line*/, 778 Dwarf_Addr * /*returned_addr*/, 779 Dwarf_Error* /*error*/); 780 781 int dwarf_lineoff(Dwarf_Line /*line*/, 782 Dwarf_Signed * /*returned_lineoffset*/, 783 Dwarf_Error* /*error*/); 784 785 int dwarf_linesrc(Dwarf_Line /*line*/, 786 char ** /*returned_name*/, 787 Dwarf_Error* /*error*/); 788 789 int dwarf_lineblock(Dwarf_Line /*line*/, 790 Dwarf_Bool * /*returned_bool*/, 791 Dwarf_Error* /*error*/); 792 793 /* tertiary interface to line info */ 794 /* Unimplemented */ 795 int dwarf_pclines(Dwarf_Debug /*dbg*/, 796 Dwarf_Addr /*pc*/, 797 Dwarf_Line** /*linebuf*/, 798 Dwarf_Signed * /*linecount*/, 799 Dwarf_Signed /*slide*/, 800 Dwarf_Error* /*error*/); 801 /* end line number operations */ 802 803 /* global name space operations (.debug_pubnames access) */ 804 int dwarf_get_globals(Dwarf_Debug /*dbg*/, 805 Dwarf_Global** /*globals*/, 806 Dwarf_Signed * /*number_of_globals*/, 807 Dwarf_Error* /*error*/); 808 809 int dwarf_globname(Dwarf_Global /*glob*/, 810 char ** /*returned_name*/, 811 Dwarf_Error* /*error*/); 812 813 int dwarf_global_die_offset(Dwarf_Global /*global*/, 814 Dwarf_Off* /*return_offset*/, 815 Dwarf_Error * /*error*/); 816 817 int dwarf_get_cu_die_offset_given_cu_header_offset( 818 Dwarf_Debug /*dbg*/, 819 Dwarf_Off /*in_cu_header_offset*/, 820 Dwarf_Off * /*out_cu_die_offset*/, 821 Dwarf_Error * /*err*/); 822 #ifdef __sgi /* pragma is sgi MIPS only */ 823 #pragma optional dwarf_get_cu_die_offset_given_cu_header_offset 824 #endif 825 826 int dwarf_global_cu_offset(Dwarf_Global /*global*/, 827 Dwarf_Off* /*return_offset*/, 828 Dwarf_Error* /*error*/); 829 830 int dwarf_global_name_offsets(Dwarf_Global /*global*/, 831 char ** /*returned_name*/, 832 Dwarf_Off* /*die_offset*/, 833 Dwarf_Off* /*cu_offset*/, 834 Dwarf_Error* /*error*/); 835 836 /* Static function name operations. */ 837 int dwarf_get_funcs(Dwarf_Debug /*dbg*/, 838 Dwarf_Func** /*funcs*/, 839 Dwarf_Signed * /*number_of_funcs*/, 840 Dwarf_Error* /*error*/); 841 842 int dwarf_funcname(Dwarf_Func /*func*/, 843 char ** /*returned_name*/, 844 Dwarf_Error* /*error*/); 845 846 int dwarf_func_die_offset(Dwarf_Func /*func*/, 847 Dwarf_Off* /*return_offset*/, 848 Dwarf_Error* /*error*/); 849 850 int dwarf_func_cu_offset(Dwarf_Func /*func*/, 851 Dwarf_Off* /*return_offset*/, 852 Dwarf_Error* /*error*/); 853 854 int dwarf_func_name_offsets(Dwarf_Func /*func*/, 855 char ** /*returned_name*/, 856 Dwarf_Off* /*die_offset*/, 857 Dwarf_Off* /*cu_offset*/, 858 Dwarf_Error* /*error*/); 859 860 /* User-defined type name operations. */ 861 int dwarf_get_types(Dwarf_Debug /*dbg*/, 862 Dwarf_Type** /*types*/, 863 Dwarf_Signed * /*number_of_types*/, 864 Dwarf_Error* /*error*/); 865 866 int dwarf_typename(Dwarf_Type /*type*/, 867 char ** /*returned_name*/, 868 Dwarf_Error* /*error*/); 869 870 int dwarf_type_die_offset(Dwarf_Type /*type*/, 871 Dwarf_Off* /*return_offset*/, 872 Dwarf_Error* /*error*/); 873 874 int dwarf_type_cu_offset(Dwarf_Type /*type*/, 875 Dwarf_Off* /*return_offset*/, 876 Dwarf_Error* /*error*/); 877 878 int dwarf_type_name_offsets(Dwarf_Type /*type*/, 879 char ** /*returned_name*/, 880 Dwarf_Off* /*die_offset*/, 881 Dwarf_Off* /*cu_offset*/, 882 Dwarf_Error* /*error*/); 883 884 /* File-scope static variable name operations. */ 885 int dwarf_get_vars(Dwarf_Debug /*dbg*/, 886 Dwarf_Var** /*vars*/, 887 Dwarf_Signed * /*number_of_vars*/, 888 Dwarf_Error* /*error*/); 889 890 int dwarf_varname(Dwarf_Var /*var*/, 891 char ** /*returned_name*/, 892 Dwarf_Error* /*error*/); 893 894 int dwarf_var_die_offset(Dwarf_Var /*var*/, 895 Dwarf_Off* /*return_offset*/, 896 Dwarf_Error* /*error*/); 897 898 int dwarf_var_cu_offset(Dwarf_Var /*var*/, 899 Dwarf_Off* /*return_offset*/, 900 Dwarf_Error* /*error*/); 901 902 int dwarf_var_name_offsets(Dwarf_Var /*var*/, 903 char ** /*returned_name*/, 904 Dwarf_Off* /*die_offset*/, 905 Dwarf_Off* /*cu_offset*/, 906 Dwarf_Error* /*error*/); 907 908 /* weak name operations. */ 909 int dwarf_get_weaks(Dwarf_Debug /*dbg*/, 910 Dwarf_Weak** /*weaks*/, 911 Dwarf_Signed * /*number_of_weaks*/, 912 Dwarf_Error* /*error*/); 913 914 int dwarf_weakname(Dwarf_Weak /*weak*/, 915 char ** /*returned_name*/, 916 Dwarf_Error* /*error*/); 917 918 int dwarf_weak_die_offset(Dwarf_Weak /*weak*/, 919 Dwarf_Off* /*return_offset*/, 920 Dwarf_Error* /*error*/); 921 922 int dwarf_weak_cu_offset(Dwarf_Weak /*weak*/, 923 Dwarf_Off* /*return_offset*/, 924 Dwarf_Error* /*error*/); 925 926 int dwarf_weak_name_offsets(Dwarf_Weak /*weak*/, 927 char ** /*returned_name*/, 928 Dwarf_Off* /*die_offset*/, 929 Dwarf_Off* /*cu_offset*/, 930 Dwarf_Error* /*error*/); 931 932 /* location list section operation. (.debug_loc access) */ 933 /* Unimplemented. */ 934 int dwarf_get_loclist_entry(Dwarf_Debug /*dbg*/, 935 Dwarf_Unsigned /*offset*/, 936 Dwarf_Addr* /*hipc*/, 937 Dwarf_Addr* /*lopc*/, 938 Dwarf_Ptr* /*data*/, 939 Dwarf_Unsigned* /*entry_len*/, 940 Dwarf_Unsigned* /*next_entry*/, 941 Dwarf_Error* /*error*/); 942 943 /* abbreviation section operations */ 944 int dwarf_get_abbrev(Dwarf_Debug /*dbg*/, 945 Dwarf_Unsigned /*offset*/, 946 Dwarf_Abbrev * /*returned_abbrev*/, 947 Dwarf_Unsigned* /*length*/, 948 Dwarf_Unsigned* /*attr_count*/, 949 Dwarf_Error* /*error*/); 950 951 int dwarf_get_abbrev_tag(Dwarf_Abbrev /*abbrev*/, 952 Dwarf_Half* /*return_tag_number*/, 953 Dwarf_Error* /*error*/); 954 int dwarf_get_abbrev_code(Dwarf_Abbrev /*abbrev*/, 955 Dwarf_Unsigned* /*return_code_number*/, 956 Dwarf_Error* /*error*/); 957 958 int dwarf_get_abbrev_children_flag(Dwarf_Abbrev /*abbrev*/, 959 Dwarf_Signed* /*return_flag*/, 960 Dwarf_Error* /*error*/); 961 962 int dwarf_get_abbrev_entry(Dwarf_Abbrev /*abbrev*/, 963 Dwarf_Signed /*index*/, 964 Dwarf_Half * /*returned_attr_num*/, 965 Dwarf_Signed* /*form*/, 966 Dwarf_Off* /*offset*/, 967 Dwarf_Error* /*error*/); 968 969 /* consumer string section operation */ 970 int dwarf_get_str(Dwarf_Debug /*dbg*/, 971 Dwarf_Off /*offset*/, 972 char** /*string*/, 973 Dwarf_Signed * /*strlen_of_string*/, 974 Dwarf_Error* /*error*/); 975 976 /* Consumer op on gnu .eh_frame info */ 977 int dwarf_get_fde_list_eh( 978 Dwarf_Debug /*dbg*/, 979 Dwarf_Cie ** /*cie_data*/, 980 Dwarf_Signed * /*cie_element_count*/, 981 Dwarf_Fde ** /*fde_data*/, 982 Dwarf_Signed * /*fde_element_count*/, 983 Dwarf_Error * /*error*/); 984 985 986 /* consumer operations on frame info: .debug_frame */ 987 int dwarf_get_fde_list(Dwarf_Debug /*dbg*/, 988 Dwarf_Cie** /*cie_data*/, 989 Dwarf_Signed* /*cie_element_count*/, 990 Dwarf_Fde** /*fde_data*/, 991 Dwarf_Signed* /*fde_element_count*/, 992 Dwarf_Error* /*error*/); 993 994 995 int dwarf_get_fde_range(Dwarf_Fde /*fde*/, 996 Dwarf_Addr* /*low_pc*/, 997 Dwarf_Unsigned* /*func_length*/, 998 Dwarf_Ptr* /*fde_bytes*/, 999 Dwarf_Unsigned* /*fde_byte_length*/, 1000 Dwarf_Off* /*cie_offset*/, 1001 Dwarf_Signed* /*cie_index*/, 1002 Dwarf_Off* /*fde_offset*/, 1003 Dwarf_Error* /*error*/); 1004 1005 int dwarf_get_fde_exception_info(Dwarf_Fde /*fde*/, 1006 Dwarf_Signed* /* offset_into_exception_tables */, 1007 Dwarf_Error* /*error*/); 1008 1009 int dwarf_get_cie_of_fde(Dwarf_Fde /*fde*/, 1010 Dwarf_Cie * /*cie_returned*/, 1011 Dwarf_Error* /*error*/); 1012 1013 int dwarf_get_cie_info(Dwarf_Cie /*cie*/, 1014 Dwarf_Unsigned * /*bytes_in_cie*/, 1015 Dwarf_Small* /*version*/, 1016 char ** /*augmenter*/, 1017 Dwarf_Unsigned* /*code_alignment_factor*/, 1018 Dwarf_Signed* /*data_alignment_factor*/, 1019 Dwarf_Half* /*return_address_register_rule*/, 1020 Dwarf_Ptr* /*initial_instructions*/, 1021 Dwarf_Unsigned* /*initial_instructions_length*/, 1022 Dwarf_Error* /*error*/); 1023 1024 int dwarf_get_fde_instr_bytes(Dwarf_Fde /*fde*/, 1025 Dwarf_Ptr * /*outinstrs*/, Dwarf_Unsigned * /*outlen*/, 1026 Dwarf_Error * /*error*/); 1027 1028 int dwarf_get_fde_info_for_all_regs(Dwarf_Fde /*fde*/, 1029 Dwarf_Addr /*pc_requested*/, 1030 Dwarf_Regtable* /*reg_table*/, 1031 Dwarf_Addr* /*row_pc*/, 1032 Dwarf_Error* /*error*/); 1033 1034 int dwarf_get_fde_info_for_reg(Dwarf_Fde /*fde*/, 1035 Dwarf_Half /*table_column*/, 1036 Dwarf_Addr /*pc_requested*/, 1037 Dwarf_Signed* /*offset_relevant*/, 1038 Dwarf_Signed* /*register*/, 1039 Dwarf_Signed* /*offset*/, 1040 Dwarf_Addr* /*row_pc*/, 1041 Dwarf_Error* /*error*/); 1042 1043 int dwarf_get_fde_for_die(Dwarf_Debug /*dbg*/, 1044 Dwarf_Die /*subr_die */, 1045 Dwarf_Fde * /*returned_fde*/, 1046 Dwarf_Error* /*error*/); 1047 1048 int dwarf_get_fde_n(Dwarf_Fde* /*fde_data*/, 1049 Dwarf_Unsigned /*fde_index*/, 1050 Dwarf_Fde * /*returned_fde*/, 1051 Dwarf_Error* /*error*/); 1052 1053 int dwarf_get_fde_at_pc(Dwarf_Fde* /*fde_data*/, 1054 Dwarf_Addr /*pc_of_interest*/, 1055 Dwarf_Fde * /*returned_fde*/, 1056 Dwarf_Addr* /*lopc*/, 1057 Dwarf_Addr* /*hipc*/, 1058 Dwarf_Error* /*error*/); 1059 1060 int dwarf_expand_frame_instructions(Dwarf_Debug /*dbg*/, 1061 Dwarf_Ptr /*instruction*/, 1062 Dwarf_Unsigned /*i_length*/, 1063 Dwarf_Frame_Op** /*returned_op_list*/, 1064 Dwarf_Signed* /*op_count*/, 1065 Dwarf_Error* /*error*/); 1066 1067 /* Operations on .debug_aranges. */ 1068 int dwarf_get_aranges(Dwarf_Debug /*dbg*/, 1069 Dwarf_Arange** /*aranges*/, 1070 Dwarf_Signed * /*arange_count*/, 1071 Dwarf_Error* /*error*/); 1072 1073 1074 1075 int dwarf_get_arange( 1076 Dwarf_Arange* /*aranges*/, 1077 Dwarf_Unsigned /*arange_count*/, 1078 Dwarf_Addr /*address*/, 1079 Dwarf_Arange * /*returned_arange*/, 1080 Dwarf_Error* /*error*/); 1081 1082 int dwarf_get_cu_die_offset( 1083 Dwarf_Arange /*arange*/, 1084 Dwarf_Off* /*return_offset*/, 1085 Dwarf_Error* /*error*/); 1086 1087 int dwarf_get_arange_cu_header_offset( 1088 Dwarf_Arange /*arange*/, 1089 Dwarf_Off* /*return_cu_header_offset*/, 1090 Dwarf_Error* /*error*/); 1091 #ifdef __sgi /* pragma is sgi MIPS only */ 1092 #pragma optional dwarf_get_arange_cu_header_offset 1093 #endif 1094 1095 int dwarf_get_arange_info( 1096 Dwarf_Arange /*arange*/, 1097 Dwarf_Addr* /*start*/, 1098 Dwarf_Unsigned* /*length*/, 1099 Dwarf_Off* /*cu_die_offset*/, 1100 Dwarf_Error* /*error*/); 1101 1102 1103 /* consumer .debug_macinfo information interface. 1104 */ 1105 struct Dwarf_Macro_Details_s { 1106 Dwarf_Off dmd_offset; /* offset, in the section, 1107 of this macro info */ 1108 Dwarf_Small dmd_type; /* the type, DW_MACINFO_define etc*/ 1109 Dwarf_Signed dmd_lineno; /* the source line number where 1110 applicable and vend_def # if 1111 vendor_extension op 1112 */ 1113 1114 Dwarf_Signed dmd_fileindex;/* the source file index: 1115 applies to define undef start_file 1116 */ 1117 char * dmd_macro; /* macro name (with value for defineop) 1118 string from vendor ext 1119 */ 1120 }; 1121 1122 /* _dwarf_print_lines is for use by dwarfdump: it prints 1123 line info to stdout. 1124 */ 1125 int _dwarf_print_lines(Dwarf_Die cu_die,Dwarf_Error * /*error*/); 1126 1127 /* _dwarf_ld_sort_lines is for use solely by ld for 1128 rearranging lines in .debug_line in a .o created with a text 1129 section per function. 1130 -OPT:procedure_reorder=ON 1131 where ld-cord (cord(1)ing by ld, 1132 not by cord(1)) may have changed the function order. 1133 */ 1134 int _dwarf_ld_sort_lines( 1135 void * orig_buffer, 1136 unsigned long buffer_len, 1137 int is_64_bit, 1138 int *any_change, 1139 int * err_code); 1140 1141 /* Used by dwarfdump -v to print offsets, for debugging 1142 dwarf info 1143 */ 1144 int _dwarf_fde_section_offset(Dwarf_Debug dbg,Dwarf_Fde in_fde, 1145 Dwarf_Off *fde_off, Dwarf_Off *cie_off, 1146 Dwarf_Error *err); 1147 1148 /* Used by dwarfdump -v to print offsets, for debugging 1149 dwarf info 1150 */ 1151 int _dwarf_cie_section_offset(Dwarf_Debug dbg,Dwarf_Cie in_cie, 1152 Dwarf_Off *cie_off, 1153 Dwarf_Error *err); 1154 1155 1156 1157 1158 typedef struct Dwarf_Macro_Details_s Dwarf_Macro_Details; 1159 1160 int dwarf_get_macro(Dwarf_Debug /*dbg*/, 1161 char * /*requested_macro_name*/, 1162 Dwarf_Addr /*pc_of_request*/, 1163 char ** /*returned_macro_value*/, 1164 Dwarf_Error * /*error*/); 1165 1166 int dwarf_get_all_defined_macros(Dwarf_Debug /*dbg*/, 1167 Dwarf_Addr /*pc_of_request*/, 1168 Dwarf_Signed * /*returned_count*/, 1169 char *** /*returned_pointers_to_macros*/, 1170 Dwarf_Error * /*error*/); 1171 1172 char *dwarf_find_macro_value_start(char * /*macro_string*/); 1173 1174 int dwarf_get_macro_details(Dwarf_Debug /*dbg*/, 1175 Dwarf_Off /*macro_offset*/, 1176 Dwarf_Unsigned /*maximum_count*/, 1177 Dwarf_Signed * /*entry_count*/, 1178 Dwarf_Macro_Details ** /*details*/, 1179 Dwarf_Error * /*err*/); 1180 1181 1182 int dwarf_get_address_size(Dwarf_Debug /*dbg*/, 1183 Dwarf_Half * /*addr_size*/, 1184 Dwarf_Error * /*error*/); 1185 1186 /* utility operations */ 1187 Dwarf_Unsigned dwarf_errno(Dwarf_Error /*error*/); 1188 1189 char* dwarf_errmsg(Dwarf_Error /*error*/); 1190 1191 /* stringcheck zero is default and means do all 1192 ** string length validity checks. 1193 ** Call with parameter value 1 to turn off many such checks (and 1194 ** increase performance). 1195 ** Call with zero for safest running. 1196 ** Actual value saved and returned is only 8 bits! Upper bits 1197 ** ignored by libdwarf (and zero on return). 1198 ** Returns previous value. 1199 */ 1200 int dwarf_set_stringcheck(int /*stringcheck*/); 1201 1202 /* Unimplemented */ 1203 Dwarf_Handler dwarf_seterrhand(Dwarf_Debug /*dbg*/, Dwarf_Handler /*errhand*/); 1204 1205 /* Unimplemented */ 1206 Dwarf_Ptr dwarf_seterrarg(Dwarf_Debug /*dbg*/, Dwarf_Ptr /*errarg*/); 1207 1208 void dwarf_dealloc(Dwarf_Debug /*dbg*/, void* /*space*/, 1209 Dwarf_Unsigned /*type*/); 1210 1211 /* DWARF Producer Interface */ 1212 1213 typedef int (*Dwarf_Callback_Func)( 1214 char* /*name*/, 1215 int /*size*/, 1216 Dwarf_Unsigned /*type*/, 1217 Dwarf_Unsigned /*flags*/, 1218 Dwarf_Unsigned /*link*/, 1219 Dwarf_Unsigned /*info*/, 1220 int* /*sect name index*/, 1221 int* /*error*/); 1222 1223 Dwarf_P_Debug dwarf_producer_init( 1224 Dwarf_Unsigned /*creation_flags*/, 1225 Dwarf_Callback_Func /*func*/, 1226 Dwarf_Handler /*errhand*/, 1227 Dwarf_Ptr /*errarg*/, 1228 Dwarf_Error* /*error*/); 1229 1230 typedef int (*Dwarf_Callback_Func_b)( 1231 char* /*name*/, 1232 int /*size*/, 1233 Dwarf_Unsigned /*type*/, 1234 Dwarf_Unsigned /*flags*/, 1235 Dwarf_Unsigned /*link*/, 1236 Dwarf_Unsigned /*info*/, 1237 Dwarf_Unsigned* /*sect_name_index*/, 1238 int* /*error*/); 1239 1240 1241 Dwarf_P_Debug dwarf_producer_init_b( 1242 Dwarf_Unsigned /*flags*/, 1243 Dwarf_Callback_Func_b /*func*/, 1244 Dwarf_Handler /*errhand*/, 1245 Dwarf_Ptr /*errarg*/, 1246 Dwarf_Error * /*error*/); 1247 1248 1249 Dwarf_Signed dwarf_transform_to_disk_form(Dwarf_P_Debug /*dbg*/, 1250 Dwarf_Error* /*error*/); 1251 1252 Dwarf_Ptr dwarf_get_section_bytes(Dwarf_P_Debug /*dbg*/, 1253 Dwarf_Signed /*dwarf_section*/, 1254 Dwarf_Signed* /*elf_section_index*/, 1255 Dwarf_Unsigned* /*length*/, 1256 Dwarf_Error* /*error*/); 1257 1258 int dwarf_get_relocation_info_count( 1259 Dwarf_P_Debug /*dbg*/, 1260 Dwarf_Unsigned * /*count_of_relocation_sections*/, 1261 int * /*drd_buffer_version*/, 1262 Dwarf_Error* /*error*/); 1263 1264 int dwarf_get_relocation_info( 1265 Dwarf_P_Debug /*dbg*/, 1266 Dwarf_Signed * /*elf_section_index*/, 1267 Dwarf_Signed * /*elf_section_index_link*/, 1268 Dwarf_Unsigned * /*relocation_buffer_count*/, 1269 Dwarf_Relocation_Data * /*reldata_buffer*/, 1270 Dwarf_Error* /*error*/); 1271 1272 /* v1: no drd_length field, enum explicit */ 1273 /* v2: has the drd_length field, enum value in uchar member */ 1274 #define DWARF_DRD_BUFFER_VERSION 2 1275 1276 void dwarf_reset_section_bytes(Dwarf_P_Debug /*dbg*/); 1277 1278 Dwarf_Unsigned dwarf_producer_finish(Dwarf_P_Debug /*dbg*/, 1279 Dwarf_Error* /*error*/); 1280 1281 /* Producer attribute addition functions. */ 1282 Dwarf_P_Attribute dwarf_add_AT_targ_address(Dwarf_P_Debug /*dbg*/, 1283 Dwarf_P_Die /*ownerdie*/, 1284 Dwarf_Half /*attr*/, 1285 Dwarf_Unsigned /*pc_value*/, 1286 Dwarf_Signed /*sym_index*/, 1287 Dwarf_Error* /*error*/); 1288 1289 Dwarf_P_Attribute dwarf_add_AT_targ_address_b(Dwarf_P_Debug /*dbg*/, 1290 Dwarf_P_Die /*ownerdie*/, 1291 Dwarf_Half /*attr*/, 1292 Dwarf_Unsigned /*pc_value*/, 1293 Dwarf_Unsigned /*sym_index*/, 1294 Dwarf_Error* /*error*/); 1295 1296 Dwarf_P_Attribute dwarf_add_AT_unsigned_const(Dwarf_P_Debug /*dbg*/, 1297 Dwarf_P_Die /*ownerdie*/, 1298 Dwarf_Half /*attr*/, 1299 Dwarf_Unsigned /*value*/, 1300 Dwarf_Error* /*error*/); 1301 1302 Dwarf_P_Attribute dwarf_add_AT_signed_const(Dwarf_P_Debug /*dbg*/, 1303 Dwarf_P_Die /*ownerdie*/, 1304 Dwarf_Half /*attr*/, 1305 Dwarf_Signed /*value*/, 1306 Dwarf_Error* /*error*/); 1307 1308 Dwarf_P_Attribute dwarf_add_AT_reference(Dwarf_P_Debug /*dbg*/, 1309 Dwarf_P_Die /*ownerdie*/, 1310 Dwarf_Half /*attr*/, 1311 Dwarf_P_Die /*otherdie*/, 1312 Dwarf_Error* /*error*/); 1313 1314 Dwarf_P_Attribute dwarf_add_AT_const_value_string(Dwarf_P_Die /*ownerdie*/, 1315 char* /*string_value*/, 1316 Dwarf_Error* /*error*/); 1317 1318 Dwarf_P_Attribute dwarf_add_AT_location_expr(Dwarf_P_Debug /*dbg*/, 1319 Dwarf_P_Die /*ownerdie*/, 1320 Dwarf_Half /*attr*/, 1321 Dwarf_P_Expr /*loc_expr*/, 1322 Dwarf_Error* /*error*/); 1323 1324 Dwarf_P_Attribute dwarf_add_AT_string(Dwarf_P_Debug /*dbg*/, 1325 Dwarf_P_Die /*ownerdie*/, 1326 Dwarf_Half /*attr*/, 1327 char* /*string*/, 1328 Dwarf_Error* /*error*/); 1329 1330 Dwarf_P_Attribute dwarf_add_AT_flag(Dwarf_P_Debug /*dbg*/, 1331 Dwarf_P_Die /*ownerdie*/, 1332 Dwarf_Half /*attr*/, 1333 Dwarf_Small /*flag*/, 1334 Dwarf_Error* /*error*/); 1335 1336 Dwarf_P_Attribute dwarf_add_AT_producer(Dwarf_P_Die /*ownerdie*/, 1337 char* /*producer_string*/, 1338 Dwarf_Error* /*error*/); 1339 1340 Dwarf_P_Attribute dwarf_add_AT_const_value_signedint(Dwarf_P_Die /*ownerdie*/, 1341 Dwarf_Signed /*signed_value*/, 1342 Dwarf_Error* /*error*/); 1343 1344 Dwarf_P_Attribute dwarf_add_AT_const_value_unsignedint( 1345 Dwarf_P_Die /*ownerdie*/, 1346 Dwarf_Unsigned /*unsigned_value*/, 1347 Dwarf_Error* /*error*/); 1348 1349 Dwarf_P_Attribute dwarf_add_AT_comp_dir(Dwarf_P_Die /*ownerdie*/, 1350 char* /*current_working_directory*/, 1351 Dwarf_Error* /*error*/); 1352 1353 Dwarf_P_Attribute dwarf_add_AT_name(Dwarf_P_Die /*die*/, 1354 char* /*name*/, 1355 Dwarf_Error* /*error*/); 1356 1357 /* Producer line creation functions (.debug_line) */ 1358 Dwarf_Unsigned dwarf_add_directory_decl(Dwarf_P_Debug /*dbg*/, 1359 char* /*name*/, 1360 Dwarf_Error* /*error*/); 1361 1362 Dwarf_Unsigned dwarf_add_file_decl(Dwarf_P_Debug /*dbg*/, 1363 char* /*name*/, 1364 Dwarf_Unsigned /*dir_index*/, 1365 Dwarf_Unsigned /*time_last_modified*/, 1366 Dwarf_Unsigned /*length*/, 1367 Dwarf_Error* /*error*/); 1368 1369 Dwarf_Unsigned dwarf_add_line_entry(Dwarf_P_Debug /*dbg*/, 1370 Dwarf_Unsigned /*file_index*/, 1371 Dwarf_Addr /*code_address*/, 1372 Dwarf_Unsigned /*lineno*/, 1373 Dwarf_Signed /*column_number*/, 1374 Dwarf_Bool /*is_source_stmt_begin*/, 1375 Dwarf_Bool /*is_basic_block_begin*/, 1376 Dwarf_Error* /*error*/); 1377 1378 Dwarf_Unsigned dwarf_lne_set_address(Dwarf_P_Debug /*dbg*/, 1379 Dwarf_Unsigned /*offset*/, 1380 Dwarf_Unsigned /*symbol_index*/, 1381 Dwarf_Error* /*error*/); 1382 1383 Dwarf_Unsigned dwarf_lne_end_sequence(Dwarf_P_Debug /*dbg*/, 1384 Dwarf_Addr /*end_address*/, 1385 Dwarf_Error* /*error*/); 1386 1387 /* Producer .debug_frame functions */ 1388 Dwarf_Unsigned dwarf_add_frame_cie(Dwarf_P_Debug /*dbg*/, 1389 char* /*augmenter*/, 1390 Dwarf_Small /*code_alignent_factor*/, 1391 Dwarf_Small /*data_alignment_factor*/, 1392 Dwarf_Small /*return_address_reg*/, 1393 Dwarf_Ptr /*initialization_bytes*/, 1394 Dwarf_Unsigned /*init_byte_len*/, 1395 Dwarf_Error* /*error*/); 1396 1397 Dwarf_Unsigned dwarf_add_frame_fde( 1398 Dwarf_P_Debug /*dbg*/, 1399 Dwarf_P_Fde /*fde*/, 1400 Dwarf_P_Die /*corresponding subprogram die*/, 1401 Dwarf_Unsigned /*cie_to_use*/, 1402 Dwarf_Unsigned /*virt_addr_of_described_code*/, 1403 Dwarf_Unsigned /*length_of_code*/, 1404 Dwarf_Unsigned /*symbol_index*/, 1405 Dwarf_Error* /*error*/); 1406 1407 Dwarf_Unsigned dwarf_add_frame_fde_b( 1408 Dwarf_P_Debug /*dbg*/, 1409 Dwarf_P_Fde /*fde*/, 1410 Dwarf_P_Die /*die*/, 1411 Dwarf_Unsigned /*cie*/, 1412 Dwarf_Addr /*virt_addr*/, 1413 Dwarf_Unsigned /*code_len*/, 1414 Dwarf_Unsigned /*sym_idx*/, 1415 Dwarf_Unsigned /*sym_idx_of_end*/, 1416 Dwarf_Addr /*offset_from_end_sym*/, 1417 Dwarf_Error* /*error*/); 1418 1419 Dwarf_Unsigned dwarf_add_frame_info_b( 1420 Dwarf_P_Debug dbg /*dbg*/, 1421 Dwarf_P_Fde /*fde*/, 1422 Dwarf_P_Die /*die*/, 1423 Dwarf_Unsigned /*cie*/, 1424 Dwarf_Addr /*virt_addr*/, 1425 Dwarf_Unsigned /*code_len*/, 1426 Dwarf_Unsigned /*symidx*/, 1427 Dwarf_Unsigned /* end_symbol */, 1428 Dwarf_Addr /* offset_from_end_symbol */, 1429 Dwarf_Signed /*offset_into_exception_tables*/, 1430 Dwarf_Unsigned /*exception_table_symbol*/, 1431 Dwarf_Error* /*error*/); 1432 1433 Dwarf_Unsigned dwarf_add_frame_info( 1434 Dwarf_P_Debug dbg /*dbg*/, 1435 Dwarf_P_Fde /*fde*/, 1436 Dwarf_P_Die /*die*/, 1437 Dwarf_Unsigned /*cie*/, 1438 Dwarf_Addr /*virt_addr*/, 1439 Dwarf_Unsigned /*code_len*/, 1440 Dwarf_Unsigned /*symidx*/, 1441 Dwarf_Signed /*offset_into_exception_tables*/, 1442 Dwarf_Unsigned /*exception_table_symbol*/, 1443 Dwarf_Error* /*error*/); 1444 1445 Dwarf_P_Fde dwarf_add_fde_inst( 1446 Dwarf_P_Fde /*fde*/, 1447 Dwarf_Small /*op*/, 1448 Dwarf_Unsigned /*val1*/, 1449 Dwarf_Unsigned /*val2*/, 1450 Dwarf_Error* /*error*/); 1451 1452 Dwarf_P_Fde dwarf_new_fde(Dwarf_P_Debug /*dbg*/, Dwarf_Error* /*error*/); 1453 1454 Dwarf_P_Fde dwarf_fde_cfa_offset( 1455 Dwarf_P_Fde /*fde*/, 1456 Dwarf_Unsigned /*register_number*/, 1457 Dwarf_Signed /*offset*/, 1458 Dwarf_Error* /*error*/); 1459 1460 /* die creation & addition routines */ 1461 Dwarf_P_Die dwarf_new_die( 1462 Dwarf_P_Debug /*dbg*/, 1463 Dwarf_Tag /*tag*/, 1464 Dwarf_P_Die /*parent*/, 1465 Dwarf_P_Die /*child*/, 1466 Dwarf_P_Die /*left */, 1467 Dwarf_P_Die /*right*/, 1468 Dwarf_Error* /*error*/); 1469 1470 Dwarf_Unsigned dwarf_add_die_to_debug( 1471 Dwarf_P_Debug /*dbg*/, 1472 Dwarf_P_Die /*die*/, 1473 Dwarf_Error* /*error*/); 1474 1475 Dwarf_P_Die dwarf_die_link( 1476 Dwarf_P_Die /*die*/, 1477 Dwarf_P_Die /*parent*/, 1478 Dwarf_P_Die /*child*/, 1479 Dwarf_P_Die /*left*/, 1480 Dwarf_P_Die /*right*/, 1481 Dwarf_Error* /*error*/); 1482 1483 /* Operations to create location expressions. */ 1484 Dwarf_P_Expr dwarf_new_expr(Dwarf_P_Debug /*dbg*/, Dwarf_Error* /*error*/); 1485 1486 Dwarf_Unsigned dwarf_add_expr_gen( 1487 Dwarf_P_Expr /*expr*/, 1488 Dwarf_Small /*opcode*/, 1489 Dwarf_Unsigned /*val1*/, 1490 Dwarf_Unsigned /*val2*/, 1491 Dwarf_Error* /*error*/); 1492 1493 Dwarf_Unsigned dwarf_add_expr_addr( 1494 Dwarf_P_Expr /*expr*/, 1495 Dwarf_Unsigned /*addr*/, 1496 Dwarf_Signed /*sym_index*/, 1497 Dwarf_Error* /*error*/); 1498 1499 Dwarf_Unsigned dwarf_add_expr_addr_b( 1500 Dwarf_P_Expr /*expr*/, 1501 Dwarf_Unsigned /*addr*/, 1502 Dwarf_Unsigned /*sym_index*/, 1503 Dwarf_Error* /*error*/); 1504 1505 Dwarf_Unsigned dwarf_expr_current_offset( 1506 Dwarf_P_Expr /*expr*/, 1507 Dwarf_Error* /*error*/); 1508 1509 Dwarf_Addr dwarf_expr_into_block( 1510 Dwarf_P_Expr /*expr*/, 1511 Dwarf_Unsigned* /*length*/, 1512 Dwarf_Error* /*error*/); 1513 1514 Dwarf_Unsigned dwarf_add_arange(Dwarf_P_Debug /*dbg*/, 1515 Dwarf_Addr /*begin_address*/, 1516 Dwarf_Unsigned /*length*/, 1517 Dwarf_Signed /*symbol_index*/, 1518 Dwarf_Error* /*error*/); 1519 1520 Dwarf_Unsigned dwarf_add_arange_b( 1521 Dwarf_P_Debug /*dbg*/, 1522 Dwarf_Addr /*begin_address*/, 1523 Dwarf_Unsigned /*length*/, 1524 Dwarf_Unsigned /*symbol_index*/, 1525 Dwarf_Unsigned /*end_symbol_index*/, 1526 Dwarf_Addr /*offset_from_end_symbol*/, 1527 Dwarf_Error * /*error*/); 1528 1529 Dwarf_Unsigned dwarf_add_pubname( 1530 Dwarf_P_Debug /*dbg*/, 1531 Dwarf_P_Die /*die*/, 1532 char* /*pubname_name*/, 1533 Dwarf_Error* /*error*/); 1534 1535 Dwarf_Unsigned dwarf_add_funcname( 1536 Dwarf_P_Debug /*dbg*/, 1537 Dwarf_P_Die /*die*/, 1538 char* /*func_name*/, 1539 Dwarf_Error* /*error*/); 1540 1541 Dwarf_Unsigned dwarf_add_typename( 1542 Dwarf_P_Debug /*dbg*/, 1543 Dwarf_P_Die /*die*/, 1544 char* /*type_name*/, 1545 Dwarf_Error* /*error*/); 1546 1547 Dwarf_Unsigned dwarf_add_varname( 1548 Dwarf_P_Debug /*dbg*/, 1549 Dwarf_P_Die /*die*/, 1550 char* /*var_name*/, 1551 Dwarf_Error* /*error*/); 1552 1553 Dwarf_Unsigned dwarf_add_weakname( 1554 Dwarf_P_Debug /*dbg*/, 1555 Dwarf_P_Die /*die*/, 1556 char* /*weak_name*/, 1557 Dwarf_Error* /*error*/); 1558 1559 /* .debug_macinfo producer functions 1560 Functions must be called in right order: the section is output 1561 In the order these are presented. 1562 */ 1563 int dwarf_def_macro(Dwarf_P_Debug /*dbg*/, 1564 Dwarf_Unsigned /*line*/, 1565 char * /*macname, with (arglist), no space before (*/, 1566 char * /*macvalue*/, 1567 Dwarf_Error* /*error*/); 1568 1569 int dwarf_undef_macro(Dwarf_P_Debug /*dbg*/, 1570 Dwarf_Unsigned /*line*/, 1571 char * /*macname, no arglist, of course*/, 1572 Dwarf_Error* /*error*/); 1573 1574 int dwarf_start_macro_file(Dwarf_P_Debug /*dbg*/, 1575 Dwarf_Unsigned /*fileindex*/, 1576 Dwarf_Unsigned /*linenumber*/, 1577 Dwarf_Error* /*error*/); 1578 1579 int dwarf_end_macro_file(Dwarf_P_Debug /*dbg*/, 1580 Dwarf_Error* /*error*/); 1581 1582 int dwarf_vendor_ext(Dwarf_P_Debug /*dbg*/, 1583 Dwarf_Unsigned /*constant*/, 1584 char * /*string*/, 1585 Dwarf_Error* /*error*/); 1586 1587 /* end macinfo producer functions */ 1588 1589 1590 void dwarf_p_dealloc(void* /*space*/, Dwarf_Unsigned /*type*/); 1591 1592 int dwarf_attr_offset(Dwarf_Die /*die*/, 1593 Dwarf_Attribute /*attr of above die*/, 1594 Dwarf_Off * /*returns offset thru this ptr */, 1595 Dwarf_Error * /*error*/); 1596 1597 1598 #ifdef __cplusplus 1599 } 1600 #endif 1601 #endif /* _LIBDWARF_H */ 1602 1603