Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
libdwarf.h
Go to the documentation of this file.
00001 /*
00002 
00003   Copyright (C) 2000, 2001 Silicon Graphics, Inc.  All Rights Reserved.
00004 
00005   This program is free software; you can redistribute it and/or modify it
00006   under the terms of version 2 of the GNU General Public License as
00007   published by the Free Software Foundation.
00008 
00009   This program is distributed in the hope that it would be useful, but
00010   WITHOUT ANY WARRANTY; without even the implied warranty of
00011   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
00012 
00013   Further, this software is distributed without any warranty that it is
00014   free of the rightful claim of any third person regarding infringement 
00015   or the like.  Any license provided herein, whether implied or 
00016   otherwise, applies only to this software file.  Patent licenses, if 
00017   any, provided herein do not apply to combinations of this program with 
00018   other software, or any other product whatsoever.  
00019 
00020   You should have received a copy of the GNU General Public License along
00021   with this program; if not, write the Free Software Foundation, Inc., 59
00022   Temple Place - Suite 330, Boston MA 02111-1307, USA.
00023 
00024   Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
00025   Mountain View, CA 94043, or:
00026 
00027   http://www.sgi.com
00028 
00029   For further information regarding this notice, see:
00030 
00031   http://oss.sgi.com/projects/GenInfo/NoticeExplan
00032 
00033 */
00034 
00035 
00036 #ifndef _LIBDWARF_H
00037 #define _LIBDWARF_H
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041 /*
00042         libdwarf.h  
00043 
00044         For libdwarf producers and consumers
00045 
00046         The interface is defined as having 8-byte signed and unsigned
00047         values so it can handle 64-or-32bit target on 64-or-32bit host.
00048         Addr is the native size: it represents pointers on
00049         the host machine (not the target!).
00050 
00051         This contains declarations for types and all producer
00052         and consumer functions.
00053 
00054         Function declarations are written on a single line each here
00055         so one can use grep  to each declaration in its entirety.
00056         The declarations are a little harder to read this way, but...
00057 
00058 */
00059 
00060 #if (_MIPS_SZLONG == 64)
00061 /* Special case for MIPS, so -64 (LP64) build gets simple -long-.
00062    Non-MIPS LP64 or ILP64 environments should probably ensure
00063    _MIPS_SZLONG set to 64 everywhere this header is #included.
00064 */
00065 typedef int             Dwarf_Bool;         /* boolean type */
00066 typedef unsigned long   Dwarf_Off;          /* 4 or 8 byte file offset */
00067 typedef unsigned long   Dwarf_Unsigned;     /* 4 or 8 byte unsigned value */
00068 typedef unsigned short  Dwarf_Half;         /* 2 byte unsigned value */
00069 typedef unsigned char   Dwarf_Small;        /* 1 byte unsigned value */
00070 typedef signed   long   Dwarf_Signed;       /* 4 or 8 byte signed value */
00071 typedef unsigned long   Dwarf_Addr;         /* target memory address */
00072 #else /* 32-bit */
00073 /* This is for ILP32, allowing i/o of 64bit dwarf info.
00074    Also should be fine for LP64 and ILP64 cases.
00075 */
00076 typedef int                 Dwarf_Bool;     /* boolean type */
00077 typedef unsigned long long  Dwarf_Off;      /* 8 byte file offset */
00078 typedef unsigned long long  Dwarf_Unsigned; /* 8 byte unsigned value*/
00079 typedef unsigned short      Dwarf_Half;     /* 2 byte unsigned value */
00080 typedef unsigned char       Dwarf_Small;    /* 1 byte unsigned value */
00081 typedef signed   long long  Dwarf_Signed;   /* 8 byte signed value */
00082 typedef unsigned long long  Dwarf_Addr;     /* target memory address */
00083 #endif
00084 typedef void*           Dwarf_Ptr;          /* host machine pointer */
00085 
00086 /* uninterpreted block of data
00087 */
00088 typedef struct {
00089         Dwarf_Unsigned  bl_len;         /* length of block */
00090         Dwarf_Ptr       bl_data;        /* uninterpreted data */
00091 } Dwarf_Block;
00092 
00093 
00094 /* location record
00095 */
00096 typedef struct {
00097         Dwarf_Small     lr_atom;        /* location operation */
00098         Dwarf_Unsigned  lr_number;      /* operand */
00099         Dwarf_Unsigned  lr_number2;     /* for OP_BREGx */
00100         Dwarf_Unsigned  lr_offset;      /* offset in locexpr for OP_BRA etc */
00101 } Dwarf_Loc;
00102 
00103 
00104 /* location description
00105 */
00106 typedef struct {
00107         Dwarf_Addr      ld_lopc;        /* beginning of active range */ 
00108         Dwarf_Addr      ld_hipc;        /* end of active range */
00109         Dwarf_Half      ld_cents;       /* count of location records */
00110         Dwarf_Loc*      ld_s;           /* pointer to list of same */
00111 } Dwarf_Locdesc;
00112 
00113 /* Frame description instructions expanded.
00114 */
00115 typedef struct {
00116         Dwarf_Small     fp_base_op;
00117         Dwarf_Small     fp_extended_op;
00118         Dwarf_Half      fp_register;
00119         Dwarf_Unsigned  fp_offset;
00120         Dwarf_Off       fp_instr_offset;
00121 } Dwarf_Frame_Op;
00122 
00123 /* DW_REG_TABLE_SIZE must reflect the number of registers 
00124  *(DW_FRAME_LAST_REG_NUM) as defined in dwarf.h
00125  */
00126 #define DW_REG_TABLE_SIZE  66
00127 typedef struct {
00128     struct {
00129         Dwarf_Small         dw_offset_relevant;
00130         Dwarf_Half          dw_regnum;
00131         Dwarf_Addr          dw_offset;
00132     }                       rules[DW_REG_TABLE_SIZE];
00133 } Dwarf_Regtable;
00134 
00135 /* for DW_DLC_SYMBOLIC_RELOCATIONS output to caller 
00136    v2, adding drd_length: some relocations are 4 and
00137    some 8 bytes (pointers are 8, section offsets 4) in
00138    some dwarf environments. (MIPS relocations are all one
00139    size in any given ABI.) Changing drd_type to an unsigned char
00140    to keep struct size down.
00141 */
00142 enum Dwarf_Rel_Type {
00143                 dwarf_drt_none, /* should not get to caller */
00144                 dwarf_drt_data_reloc, /* simple normal relocation */
00145                 dwarf_drt_segment_rel, /* special reloc, exceptions*/
00146                 dwarf_drt_first_of_length_pair,/* this and drt_second 
00147                                 for .word end - begin
00148                                 case */
00149                 dwarf_drt_second_of_length_pair
00150 };
00151 typedef struct Dwarf_Relocation_Data_s  * Dwarf_Relocation_Data;
00152 struct Dwarf_Relocation_Data_s {
00153         unsigned char drd_type; /* cast to/from Dwarf_Rel_Type
00154                                           to keep size small in struct */
00155         unsigned char drd_length; /* length in bytes
00156                                  of data being relocated. 4 for 32bit.
00157                                  8 for 64bit data */
00158         Dwarf_Unsigned       drd_offset; /* where the data to reloc is */
00159         Dwarf_Unsigned       drd_symbol_index;
00160 };
00161 
00162 /* Opaque types for Consumer Library. */
00163 typedef struct Dwarf_Debug_s*      Dwarf_Debug;
00164 typedef struct Dwarf_Die_s*        Dwarf_Die;
00165 typedef struct Dwarf_Line_s*       Dwarf_Line;
00166 typedef struct Dwarf_Global_s*     Dwarf_Global;
00167 typedef struct Dwarf_Func_s*       Dwarf_Func;
00168 typedef struct Dwarf_Type_s*       Dwarf_Type;
00169 typedef struct Dwarf_Var_s*        Dwarf_Var;
00170 typedef struct Dwarf_Weak_s*       Dwarf_Weak;
00171 typedef struct Dwarf_Error_s*      Dwarf_Error;
00172 typedef struct Dwarf_Attribute_s*  Dwarf_Attribute;
00173 typedef struct Dwarf_Abbrev_s*     Dwarf_Abbrev;
00174 typedef struct Dwarf_Fde_s*        Dwarf_Fde;
00175 typedef struct Dwarf_Cie_s*        Dwarf_Cie;
00176 typedef struct Dwarf_Arange_s*     Dwarf_Arange;
00177 
00178 /* Opaque types for Producer Library. */
00179 typedef struct Dwarf_P_Debug_s*         Dwarf_P_Debug;
00180 typedef struct Dwarf_P_Die_s*           Dwarf_P_Die;
00181 typedef struct Dwarf_P_Attribute_s*     Dwarf_P_Attribute;
00182 typedef struct Dwarf_P_Fde_s*           Dwarf_P_Fde;
00183 typedef struct Dwarf_P_Expr_s*          Dwarf_P_Expr;
00184 typedef Dwarf_Unsigned                  Dwarf_Tag;
00185 
00186 
00187 /* error handler function
00188 */
00189 typedef void  (*Dwarf_Handler)(Dwarf_Error /*error*/, Dwarf_Ptr /*errarg*/); 
00190 
00191 
00192 /* 
00193     Dwarf_dealloc() alloc_type arguments.
00194     Argument points to:
00195 */
00196 #define DW_DLA_STRING           0x01     /* char* */
00197 #define DW_DLA_LOC              0x02     /* Dwarf_Loc */
00198 #define DW_DLA_LOCDESC          0x03     /* Dwarf_Locdesc */
00199 #define DW_DLA_ELLIST           0x04     /* Dwarf_Ellist (not used)*/
00200 #define DW_DLA_BOUNDS           0x05     /* Dwarf_Bounds (not used) */
00201 #define DW_DLA_BLOCK            0x06     /* Dwarf_Block */
00202 #define DW_DLA_DEBUG            0x07     /* Dwarf_Debug */
00203 #define DW_DLA_DIE              0x08     /* Dwarf_Die */
00204 #define DW_DLA_LINE             0x09     /* Dwarf_Line */
00205 #define DW_DLA_ATTR             0x0a     /* Dwarf_Attribute */
00206 #define DW_DLA_TYPE             0x0b     /* Dwarf_Type  (not used) */
00207 #define DW_DLA_SUBSCR           0x0c     /* Dwarf_Subscr (not used) */
00208 #define DW_DLA_GLOBAL           0x0d     /* Dwarf_Global */
00209 #define DW_DLA_ERROR            0x0e     /* Dwarf_Error */
00210 #define DW_DLA_LIST             0x0f     /* a list */
00211 #define DW_DLA_LINEBUF          0x10     /* Dwarf_Line* (not used) */
00212 #define DW_DLA_ARANGE           0x11     /* Dwarf_Arange */
00213 #define DW_DLA_ABBREV           0x12     /* Dwarf_Abbrev */
00214 #define DW_DLA_FRAME_OP         0x13     /* Dwarf_Frame_Op */
00215 #define DW_DLA_CIE              0x14     /* Dwarf_Cie */
00216 #define DW_DLA_FDE              0x15     /* Dwarf_Fde */
00217 #define DW_DLA_LOC_BLOCK        0x16     /* Dwarf_Loc Block (not used) */
00218 #define DW_DLA_FRAME_BLOCK      0x17     /* Dwarf_Frame Block (not used) */
00219 #define DW_DLA_FUNC             0x18     /* Dwarf_Func */
00220 #define DW_DLA_TYPENAME         0x19     /* Dwarf_Type */
00221 #define DW_DLA_VAR              0x1a     /* Dwarf_Var */
00222 #define DW_DLA_WEAK             0x1b     /* Dwarf_Weak */
00223 #define DW_DLA_ADDR             0x1c     /* Dwarf_Addr sized entries */
00224 
00225 /* The augmenter string for CIE */
00226 #define DW_CIE_AUGMENTER_STRING_V0              "z"
00227 
00228 /* dwarf_init() access arguments
00229 */
00230 #define DW_DLC_READ        0        /* read only access */
00231 #define DW_DLC_WRITE       1        /* write only access */
00232 #define DW_DLC_RDWR        2        /* read/write access NOT SUPPORTED*/
00233 
00234 /* dwarf_init() access flag modifiers
00235 */
00236 #define DW_DLC_SIZE_64     0x40000000 /* 32-bit target */
00237 #define DW_DLC_SIZE_32     0x20000000 /* 64-bit target */
00238 
00239 /* dwarf_init() access flag modifiers
00240 */
00241 #define DW_DLC_ISA_MIPS             0x00000000 /* MIPS target */
00242 #define DW_DLC_ISA_IA64             0x01000000 /* IA64 target */
00243 #define DW_DLC_STREAM_RELOCATIONS   0x02000000 /* old style binary relocs */
00244 #define DW_DLC_SYMBOLIC_RELOCATIONS 0x04000000 /* usable with assem output */
00245 #define DW_DLC_TARGET_BIGENDIAN     0x08000000 /* big    endian target */
00246 #define DW_DLC_TARGET_LITTLEENDIAN  0x00100000 /* little endian target */
00247 
00248 /* dwarf_pcline() slide arguments
00249 */
00250 #define DW_DLS_BACKWARD   -1       /* slide backward to find line */
00251 #define DW_DLS_NOSLIDE     0       /* match exactly without sliding */ 
00252 #define DW_DLS_FORWARD     1       /* slide forward to find line */
00253 
00254 /* libdwarf error numbers
00255 */
00256 #define DW_DLE_NE          0     /* no error */ 
00257 #define DW_DLE_VMM         1     /* dwarf format/library version mismatch */
00258 #define DW_DLE_MAP         2     /* memory map failure */
00259 #define DW_DLE_LEE         3     /* libelf error */
00260 #define DW_DLE_NDS         4     /* no debug section */
00261 #define DW_DLE_NLS         5     /* no line section */
00262 #define DW_DLE_ID          6     /* invalid descriptor for query */
00263 #define DW_DLE_IOF         7     /* I/O failure */
00264 #define DW_DLE_MAF         8     /* memory allocation failure */
00265 #define DW_DLE_IA          9     /* invalid argument */ 
00266 #define DW_DLE_MDE         10     /* mangled debugging entry */
00267 #define DW_DLE_MLE         11     /* mangled line number entry */
00268 #define DW_DLE_FNO         12     /* file not open */
00269 #define DW_DLE_FNR         13     /* file not a regular file */
00270 #define DW_DLE_FWA         14     /* file open with wrong access */
00271 #define DW_DLE_NOB         15     /* not an object file */
00272 #define DW_DLE_MOF         16     /* mangled object file header */
00273 #define DW_DLE_EOLL        17     /* end of location list entries */
00274 #define DW_DLE_NOLL        18     /* no location list section */
00275 #define DW_DLE_BADOFF      19     /* Invalid offset */
00276 #define DW_DLE_EOS         20     /* end of section  */
00277 #define DW_DLE_ATRUNC      21     /* abbreviations section appears truncated*/
00278 #define DW_DLE_BADBITC     22     /* Address size passed to dwarf bad*/
00279                                     /* It is not an allowed size (64 or 32) */
00280     /* Error codes defined by the current Libdwarf Implementation. */
00281 #define DW_DLE_DBG_ALLOC                        23
00282 #define DW_DLE_FSTAT_ERROR                      24
00283 #define DW_DLE_FSTAT_MODE_ERROR                 25
00284 #define DW_DLE_INIT_ACCESS_WRONG                26
00285 #define DW_DLE_ELF_BEGIN_ERROR                  27
00286 #define DW_DLE_ELF_GETEHDR_ERROR                28
00287 #define DW_DLE_ELF_GETSHDR_ERROR                29
00288 #define DW_DLE_ELF_STRPTR_ERROR                 30
00289 #define DW_DLE_DEBUG_INFO_DUPLICATE             31
00290 #define DW_DLE_DEBUG_INFO_NULL                  32
00291 #define DW_DLE_DEBUG_ABBREV_DUPLICATE           33
00292 #define DW_DLE_DEBUG_ABBREV_NULL                34
00293 #define DW_DLE_DEBUG_ARANGES_DUPLICATE          35
00294 #define DW_DLE_DEBUG_ARANGES_NULL               36
00295 #define DW_DLE_DEBUG_LINE_DUPLICATE             37
00296 #define DW_DLE_DEBUG_LINE_NULL                  38
00297 #define DW_DLE_DEBUG_LOC_DUPLICATE              39
00298 #define DW_DLE_DEBUG_LOC_NULL                   40
00299 #define DW_DLE_DEBUG_MACINFO_DUPLICATE          41
00300 #define DW_DLE_DEBUG_MACINFO_NULL               42
00301 #define DW_DLE_DEBUG_PUBNAMES_DUPLICATE         43
00302 #define DW_DLE_DEBUG_PUBNAMES_NULL              44
00303 #define DW_DLE_DEBUG_STR_DUPLICATE              45
00304 #define DW_DLE_DEBUG_STR_NULL                   46
00305 #define DW_DLE_CU_LENGTH_ERROR                  47
00306 #define DW_DLE_VERSION_STAMP_ERROR              48
00307 #define DW_DLE_ABBREV_OFFSET_ERROR              49
00308 #define DW_DLE_ADDRESS_SIZE_ERROR               50
00309 #define DW_DLE_DEBUG_INFO_PTR_NULL              51
00310 #define DW_DLE_DIE_NULL                         52
00311 #define DW_DLE_STRING_OFFSET_BAD                53
00312 #define DW_DLE_DEBUG_LINE_LENGTH_BAD            54
00313 #define DW_DLE_LINE_PROLOG_LENGTH_BAD           55
00314 #define DW_DLE_LINE_NUM_OPERANDS_BAD            56
00315 #define DW_DLE_LINE_SET_ADDR_ERROR              57
00316 #define DW_DLE_LINE_EXT_OPCODE_BAD              58
00317 #define DW_DLE_DWARF_LINE_NULL                  59
00318 #define DW_DLE_INCL_DIR_NUM_BAD                 60
00319 #define DW_DLE_LINE_FILE_NUM_BAD                61
00320 #define DW_DLE_ALLOC_FAIL                       62
00321 #define DW_DLE_NO_CALLBACK_FUNC                 63
00322 #define DW_DLE_SECT_ALLOC                       64
00323 #define DW_DLE_FILE_ENTRY_ALLOC                 65
00324 #define DW_DLE_LINE_ALLOC                       66
00325 #define DW_DLE_FPGM_ALLOC                       67
00326 #define DW_DLE_INCDIR_ALLOC                     68
00327 #define DW_DLE_STRING_ALLOC                     69
00328 #define DW_DLE_CHUNK_ALLOC                      70
00329 #define DW_DLE_BYTEOFF_ERR                      71
00330 #define DW_DLE_CIE_ALLOC                        72
00331 #define DW_DLE_FDE_ALLOC                        73
00332 #define DW_DLE_REGNO_OVFL                       74
00333 #define DW_DLE_CIE_OFFS_ALLOC                   75
00334 #define DW_DLE_WRONG_ADDRESS                    76
00335 #define DW_DLE_EXTRA_NEIGHBORS                  77
00336 #define DW_DLE_WRONG_TAG                        78
00337 #define DW_DLE_DIE_ALLOC                        79
00338 #define DW_DLE_PARENT_EXISTS                    80
00339 #define DW_DLE_DBG_NULL                         81
00340 #define DW_DLE_DEBUGLINE_ERROR                  82
00341 #define DW_DLE_DEBUGFRAME_ERROR                 83
00342 #define DW_DLE_DEBUGINFO_ERROR                  84
00343 #define DW_DLE_ATTR_ALLOC                       85
00344 #define DW_DLE_ABBREV_ALLOC                     86
00345 #define DW_DLE_OFFSET_UFLW                      87
00346 #define DW_DLE_ELF_SECT_ERR                     88
00347 #define DW_DLE_DEBUG_FRAME_LENGTH_BAD           89
00348 #define DW_DLE_FRAME_VERSION_BAD                90
00349 #define DW_DLE_CIE_RET_ADDR_REG_ERROR           91
00350 #define DW_DLE_FDE_NULL                         92
00351 #define DW_DLE_FDE_DBG_NULL                     93
00352 #define DW_DLE_CIE_NULL                         94
00353 #define DW_DLE_CIE_DBG_NULL                     95
00354 #define DW_DLE_FRAME_TABLE_COL_BAD              96
00355 #define DW_DLE_PC_NOT_IN_FDE_RANGE              97
00356 #define DW_DLE_CIE_INSTR_EXEC_ERROR             98
00357 #define DW_DLE_FRAME_INSTR_EXEC_ERROR           99
00358 #define DW_DLE_FDE_PTR_NULL                     100
00359 #define DW_DLE_RET_OP_LIST_NULL                 101
00360 #define DW_DLE_LINE_CONTEXT_NULL                102
00361 #define DW_DLE_DBG_NO_CU_CONTEXT                103
00362 #define DW_DLE_DIE_NO_CU_CONTEXT                104
00363 #define DW_DLE_FIRST_DIE_NOT_CU                 105
00364 #define DW_DLE_NEXT_DIE_PTR_NULL                106
00365 #define DW_DLE_DEBUG_FRAME_DUPLICATE            107
00366 #define DW_DLE_DEBUG_FRAME_NULL                 108
00367 #define DW_DLE_ABBREV_DECODE_ERROR              109
00368 #define DW_DLE_DWARF_ABBREV_NULL                110
00369 #define DW_DLE_ATTR_NULL                        111
00370 #define DW_DLE_DIE_BAD                          112
00371 #define DW_DLE_DIE_ABBREV_BAD                   113
00372 #define DW_DLE_ATTR_FORM_BAD                    114
00373 #define DW_DLE_ATTR_NO_CU_CONTEXT               115
00374 #define DW_DLE_ATTR_FORM_SIZE_BAD               116
00375 #define DW_DLE_ATTR_DBG_NULL                    117
00376 #define DW_DLE_BAD_REF_FORM                     118
00377 #define DW_DLE_ATTR_FORM_OFFSET_BAD             119
00378 #define DW_DLE_LINE_OFFSET_BAD                  120
00379 #define DW_DLE_DEBUG_STR_OFFSET_BAD             121
00380 #define DW_DLE_STRING_PTR_NULL                  122
00381 #define DW_DLE_PUBNAMES_VERSION_ERROR           123
00382 #define DW_DLE_PUBNAMES_LENGTH_BAD              124
00383 #define DW_DLE_GLOBAL_NULL                      125
00384 #define DW_DLE_GLOBAL_CONTEXT_NULL              126
00385 #define DW_DLE_DIR_INDEX_BAD                    127
00386 #define DW_DLE_LOC_EXPR_BAD                     128
00387 #define DW_DLE_DIE_LOC_EXPR_BAD                 129
00388 #define DW_DLE_ADDR_ALLOC                       130
00389 #define DW_DLE_OFFSET_BAD                       131
00390 #define DW_DLE_MAKE_CU_CONTEXT_FAIL             132
00391 #define DW_DLE_REL_ALLOC                        133
00392 #define DW_DLE_ARANGE_OFFSET_BAD                134
00393 #define DW_DLE_SEGMENT_SIZE_BAD                 135
00394 #define DW_DLE_ARANGE_LENGTH_BAD                136
00395 #define DW_DLE_ARANGE_DECODE_ERROR              137
00396 #define DW_DLE_ARANGES_NULL                     138
00397 #define DW_DLE_ARANGE_NULL                      139
00398 #define DW_DLE_NO_FILE_NAME                     140
00399 #define DW_DLE_NO_COMP_DIR                      141
00400 #define DW_DLE_CU_ADDRESS_SIZE_BAD              142
00401 #define DW_DLE_INPUT_ATTR_BAD                   143
00402 #define DW_DLE_EXPR_NULL                        144
00403 #define DW_DLE_BAD_EXPR_OPCODE                  145
00404 #define DW_DLE_EXPR_LENGTH_BAD                  146
00405 #define DW_DLE_MULTIPLE_RELOC_IN_EXPR           147
00406 #define DW_DLE_ELF_GETIDENT_ERROR               148
00407 #define DW_DLE_NO_AT_MIPS_FDE                   149
00408 #define DW_DLE_NO_CIE_FOR_FDE                   150
00409 #define DW_DLE_DIE_ABBREV_LIST_NULL             151
00410 #define DW_DLE_DEBUG_FUNCNAMES_DUPLICATE        152
00411 #define DW_DLE_DEBUG_FUNCNAMES_NULL             153
00412 #define DW_DLE_DEBUG_FUNCNAMES_VERSION_ERROR    154
00413 #define DW_DLE_DEBUG_FUNCNAMES_LENGTH_BAD       155
00414 #define DW_DLE_FUNC_NULL                        156
00415 #define DW_DLE_FUNC_CONTEXT_NULL                157
00416 #define DW_DLE_DEBUG_TYPENAMES_DUPLICATE        158
00417 #define DW_DLE_DEBUG_TYPENAMES_NULL             159
00418 #define DW_DLE_DEBUG_TYPENAMES_VERSION_ERROR    160
00419 #define DW_DLE_DEBUG_TYPENAMES_LENGTH_BAD       161
00420 #define DW_DLE_TYPE_NULL                        162
00421 #define DW_DLE_TYPE_CONTEXT_NULL                163
00422 #define DW_DLE_DEBUG_VARNAMES_DUPLICATE         164
00423 #define DW_DLE_DEBUG_VARNAMES_NULL              165
00424 #define DW_DLE_DEBUG_VARNAMES_VERSION_ERROR     166
00425 #define DW_DLE_DEBUG_VARNAMES_LENGTH_BAD        167
00426 #define DW_DLE_VAR_NULL                         168
00427 #define DW_DLE_VAR_CONTEXT_NULL                 169
00428 #define DW_DLE_DEBUG_WEAKNAMES_DUPLICATE        170
00429 #define DW_DLE_DEBUG_WEAKNAMES_NULL             171
00430 #define DW_DLE_DEBUG_WEAKNAMES_VERSION_ERROR    172
00431 #define DW_DLE_DEBUG_WEAKNAMES_LENGTH_BAD       173
00432 #define DW_DLE_WEAK_NULL                        174
00433 #define DW_DLE_WEAK_CONTEXT_NULL                175
00434 #define DW_DLE_LOCDESC_COUNT_WRONG              176
00435 #define DW_DLE_MACINFO_STRING_NULL              177
00436 #define DW_DLE_MACINFO_STRING_EMPTY             178
00437 #define DW_DLE_MACINFO_INTERNAL_ERROR_SPACE     179
00438 #define DW_DLE_MACINFO_MALLOC_FAIL              180
00439 #define DW_DLE_DEBUGMACINFO_ERROR               181
00440 #define DW_DLE_DEBUG_MACRO_LENGTH_BAD           182
00441 #define DW_DLE_DEBUG_MACRO_MAX_BAD              183
00442 #define DW_DLE_DEBUG_MACRO_INTERNAL_ERR         184
00443 #define DW_DLE_DEBUG_MACRO_MALLOC_SPACE         185
00444 #define DW_DLE_DEBUG_MACRO_INCONSISTENT         186
00445 #define DW_DLE_DF_NO_CIE_AUGMENTATION           187
00446 #define DW_DLE_DF_REG_NUM_TOO_HIGH              188 
00447 #define DW_DLE_DF_MAKE_INSTR_NO_INIT            189 
00448 #define DW_DLE_DF_NEW_LOC_LESS_OLD_LOC          190
00449 #define DW_DLE_DF_POP_EMPTY_STACK               191
00450 #define DW_DLE_DF_ALLOC_FAIL                    192
00451 #define DW_DLE_DF_FRAME_DECODING_ERROR          193
00452 
00453     /* DW_DLE_LAST MUST EQUAL LAST ERROR NUMBER */
00454 #define DW_DLE_LAST                             193
00455 #define DW_DLE_LO_USER     0x10000
00456 
00457         /* taken as meaning 'undefined value', this is not
00458            a column or register number.
00459            Only present at libdwarf runtime. Never on disk.
00460            DW_FRAME_* Values present on disk are in dwarf.h
00461         */
00462 #define DW_FRAME_UNDEFINED_VAL          1034
00463 
00464         /* taken as meaning 'same value' as caller had, not a column
00465            or register number
00466            Only present at libdwarf runtime. Never on disk.
00467            DW_FRAME_* Values present on disk are in dwarf.h
00468         */
00469 #define DW_FRAME_SAME_VAL               1035
00470 
00471 
00472 
00473 /* error return values  
00474 */
00475 #define DW_DLV_BADADDR     (~(Dwarf_Addr)0)   
00476         /* for functions returning target address */
00477 
00478 #define DW_DLV_NOCOUNT     ((Dwarf_Signed)-1) 
00479         /* for functions returning count */
00480 
00481 #define DW_DLV_BADOFFSET   (~(Dwarf_Off)0)    
00482         /* for functions returning offset */
00483 
00484 /* standard return values for functions */
00485 #define DW_DLV_NO_ENTRY -1
00486 #define DW_DLV_OK        0
00487 #define DW_DLV_ERROR     1
00488 
00489 /* Special values for offset_into_exception_table field of dwarf fde's. */
00490 /* The following value indicates that there is no Exception table offset
00491    associated with a dwarf frame. */
00492 #define DW_DLX_NO_EH_OFFSET        (-1LL)
00493 /* The following value indicates that the producer was unable to analyse the
00494    source file to generate Exception tables for this function. */
00495 #define DW_DLX_EH_OFFSET_UNAVAILABLE  (-2LL)
00496 
00497 
00498 /*===========================================================================*/
00499 /*  Dwarf consumer interface initialization and termination operations */
00500 
00501 /* non-elf initialization */
00502 int dwarf_init(int      /*fd*/, 
00503     Dwarf_Unsigned      /*access*/, 
00504     Dwarf_Handler       /*errhand*/, 
00505     Dwarf_Ptr           /*errarg*/, 
00506     Dwarf_Debug      *  /*dbg*/,
00507     Dwarf_Error*        /*error*/);
00508 
00509 /* elf intialization */
00510 int dwarf_elf_init(Elf* /*elf*/, 
00511     Dwarf_Unsigned      /*access*/, 
00512     Dwarf_Handler       /*errhand*/, 
00513     Dwarf_Ptr           /*errarg*/, 
00514     Dwarf_Debug      *  /*dbg*/,
00515     Dwarf_Error*        /*error*/);
00516 
00517 /* Undocumented function for memory allocator. */
00518 void dwarf_print_memory_stats(Dwarf_Debug  /*dbg*/);
00519 
00520 
00521 int dwarf_get_elf(Dwarf_Debug /*dbg*/,
00522     Elf **              /*return_elfptr*/,
00523     Dwarf_Error*        /*error*/);
00524 
00525 int dwarf_finish(Dwarf_Debug /*dbg*/, Dwarf_Error* /*error*/);
00526 
00527 /* die traversal operations */
00528 int dwarf_next_cu_header(Dwarf_Debug /*dbg*/, 
00529     Dwarf_Unsigned*     /*cu_header_length*/, 
00530     Dwarf_Half*         /*version_stamp*/, 
00531     Dwarf_Off*          /*abbrev_offset*/, 
00532     Dwarf_Half*         /*address_size*/, 
00533     Dwarf_Unsigned*     /*next_cu_header_offset*/,
00534     Dwarf_Error*        /*error*/);
00535 
00536 int dwarf_siblingof(Dwarf_Debug /*dbg*/, 
00537     Dwarf_Die           /*die*/, 
00538     Dwarf_Die*          /*return_siblingdie*/,
00539     Dwarf_Error*        /*error*/);
00540 
00541 int dwarf_child(Dwarf_Die /*die*/, 
00542     Dwarf_Die*          /*return_childdie*/,
00543     Dwarf_Error*        /*error*/);
00544 
00545 /* finding die given offset */
00546 int dwarf_offdie(Dwarf_Debug /*dbg*/, 
00547     Dwarf_Off           /*offset*/, 
00548     Dwarf_Die*          /*return_die*/,
00549     Dwarf_Error*        /*error*/);
00550 
00551 /* higher level functions (Unimplemented) */
00552 int dwarf_pcfile(Dwarf_Debug /*dbg*/, 
00553     Dwarf_Addr          /*pc*/, 
00554     Dwarf_Die*          /*return_die*/,
00555     Dwarf_Error*        /*error*/);
00556 
00557 /* Unimplemented */
00558 int dwarf_pcsubr(Dwarf_Debug /*dbg*/, 
00559     Dwarf_Addr          /*pc*/, 
00560     Dwarf_Die*          /*return_die*/,
00561     Dwarf_Error*        /*error*/);
00562 
00563 /* Unimplemented */
00564 int dwarf_pcscope(Dwarf_Debug /*dbg*/, 
00565     Dwarf_Addr          /*pc*/, 
00566     Dwarf_Die*          /*return_die*/,
00567     Dwarf_Error*        /*error*/);
00568 
00569 /* operations on DIEs */
00570 int dwarf_tag(Dwarf_Die /*die*/, 
00571     Dwarf_Half*         /*return_tag*/,
00572     Dwarf_Error*        /*error*/);
00573 
00574 /* utility? */
00575 int dwarf_dieoffset(Dwarf_Die /*die*/, 
00576     Dwarf_Off*          /*return_offset*/,
00577     Dwarf_Error*        /*error*/);
00578 
00579 int dwarf_die_CU_offset(Dwarf_Die /*die*/,
00580     Dwarf_Off*          /*return_offset*/,
00581     Dwarf_Error*        /*error*/);
00582 
00583 int dwarf_attr (Dwarf_Die /*die*/, 
00584     Dwarf_Half          /*attr*/, 
00585     Dwarf_Attribute *   /*returned_attr*/,
00586     Dwarf_Error*        /*error*/);
00587 
00588 int dwarf_diename(Dwarf_Die /*die*/, 
00589     char   **           /*diename*/,
00590     Dwarf_Error*        /*error*/);
00591 
00592 /* convenience functions, alternative to using dwarf_attrlist() */
00593 int dwarf_hasattr(Dwarf_Die /*die*/, 
00594     Dwarf_Half          /*attr*/, 
00595     Dwarf_Bool     *    /*returned_bool*/,
00596     Dwarf_Error*        /*error*/);
00597 
00598 int dwarf_loclist(Dwarf_Attribute /*attr*/, 
00599     Dwarf_Locdesc**     /*llbuf*/, 
00600     Dwarf_Signed *      /*locCount*/,
00601     Dwarf_Error*        /*error*/);
00602 
00603 /* Unimplemented */
00604 int dwarf_stringlen(Dwarf_Die /*die*/, 
00605     Dwarf_Locdesc **    /*returned_locdesc*/,
00606     Dwarf_Error*        /*error*/);
00607 
00608 /* Unimplemented */
00609 int dwarf_subscrcnt(Dwarf_Die /*die*/, 
00610     Dwarf_Signed *      /*returned_count*/,
00611     Dwarf_Error*        /*error*/);
00612 
00613 /* Unimplemented */
00614 int dwarf_nthsubscr(Dwarf_Die /*die*/, 
00615     Dwarf_Unsigned      /*ssndx*/, 
00616     Dwarf_Die *         /*returned_die*/,
00617     Dwarf_Error*        /*error*/);
00618 
00619 int dwarf_lowpc(Dwarf_Die /*die*/, 
00620     Dwarf_Addr  *       /*returned_addr*/,
00621     Dwarf_Error*        /*error*/);
00622 
00623 int dwarf_highpc(Dwarf_Die /*die*/, 
00624     Dwarf_Addr  *       /*returned_addr*/,
00625     Dwarf_Error*        /*error*/);
00626 
00627 int dwarf_bytesize(Dwarf_Die /*die*/, 
00628     Dwarf_Unsigned *    /*returned_size*/,
00629     Dwarf_Error*        /*error*/);
00630 
00631 /* Unimplemented */
00632 int dwarf_isbitfield(Dwarf_Die /*die*/, 
00633     Dwarf_Bool  *       /*returned_bool*/,
00634     Dwarf_Error*        /*error*/);
00635 
00636 int dwarf_bitsize(Dwarf_Die /*die*/, 
00637     Dwarf_Unsigned *    /*returned_size*/,
00638     Dwarf_Error*        /*error*/);
00639 
00640 int dwarf_bitoffset(Dwarf_Die /*die*/, 
00641     Dwarf_Unsigned *    /*returned_offset*/,
00642     Dwarf_Error*        /*error*/);
00643 
00644 int dwarf_srclang(Dwarf_Die /*die*/, 
00645     Dwarf_Unsigned *    /*returned_lang*/,
00646     Dwarf_Error*        /*error*/);
00647 
00648 int dwarf_arrayorder(Dwarf_Die /*die*/, 
00649     Dwarf_Unsigned *    /*returned_order*/,
00650     Dwarf_Error*        /*error*/);
00651 
00652 /* end of convenience function list */
00653 
00654 /* this is the main interface to attributes of a DIE */
00655 int dwarf_attrlist(Dwarf_Die /*die*/, 
00656     Dwarf_Attribute**   /*attrbuf*/, 
00657     Dwarf_Signed   *    /*attrcount*/,
00658     Dwarf_Error*        /*error*/);
00659 
00660 /* query operations for attributes */
00661 int dwarf_hasform(Dwarf_Attribute /*attr*/, 
00662     Dwarf_Half          /*form*/, 
00663     Dwarf_Bool *        /*returned_bool*/,
00664     Dwarf_Error*        /*error*/);
00665 
00666 int dwarf_whatform(Dwarf_Attribute /*attr*/, 
00667     Dwarf_Half *        /*returned_form*/,
00668     Dwarf_Error*        /*error*/);
00669 
00670 int dwarf_whatattr(Dwarf_Attribute /*attr*/, 
00671     Dwarf_Half *        /*returned_attr_num*/,
00672     Dwarf_Error*        /*error*/);
00673 
00674 /* 
00675     The following are concerned with the Primary Interface: getting
00676     the actual data values. One function per 'kind' of FORM.
00677 */
00678         /*dwarf_formref returns, thru return_offset, a CU-relative offset
00679         ** and does not allow DW_FORM_ref_addr*/
00680 int dwarf_formref(Dwarf_Attribute /*attr*/, 
00681     Dwarf_Off*          /*return_offset*/,
00682     Dwarf_Error*        /*error*/);
00683         /*dwarf_global_formref returns, thru return_offset, 
00684          a debug_info-relative offset and does allow all reference forms*/
00685 int dwarf_global_formref(Dwarf_Attribute /*attr*/, 
00686     Dwarf_Off*          /*return_offset*/,
00687     Dwarf_Error*        /*error*/);
00688 
00689 int dwarf_formaddr(Dwarf_Attribute /*attr*/, 
00690     Dwarf_Addr   *      /*returned_addr*/,
00691     Dwarf_Error*        /*error*/);
00692 
00693 int dwarf_formflag(Dwarf_Attribute /*attr*/,
00694     Dwarf_Bool *        /*returned_bool*/,
00695     Dwarf_Error*        /*error*/);
00696 
00697 int dwarf_formudata(Dwarf_Attribute /*attr*/, 
00698     Dwarf_Unsigned  *   /*returned_val*/,
00699     Dwarf_Error*        /*error*/);
00700 
00701 int dwarf_formsdata(Dwarf_Attribute     /*attr*/, 
00702     Dwarf_Signed  *     /*returned_val*/,
00703     Dwarf_Error*        /*error*/);
00704 
00705 int dwarf_formblock(Dwarf_Attribute /*attr*/, 
00706     Dwarf_Block    **   /*returned_block*/,
00707     Dwarf_Error*        /*error*/);
00708 
00709 int dwarf_formstring(Dwarf_Attribute /*attr*/, 
00710     char   **           /*returned_string*/,
00711     Dwarf_Error*        /*error*/);
00712 
00713 /* end attribute query operations. */
00714 
00715 /* line number operations */
00716 /* dwarf_srclines  is the normal interface */
00717 int dwarf_srclines(Dwarf_Die /*die*/, 
00718     Dwarf_Line**        /*linebuf*/, 
00719     Dwarf_Signed *      /*linecount*/,
00720     Dwarf_Error*        /*error*/);
00721 
00722 int dwarf_srcfiles(Dwarf_Die /*die*/, 
00723     char***             /*srcfiles*/, 
00724     Dwarf_Signed *      /*filecount*/,
00725     Dwarf_Error*        /*error*/);
00726 
00727 /* Unimplemented. */
00728 int dwarf_dieline(Dwarf_Die /*die*/, 
00729     Dwarf_Line  *       /*returned_line*/,
00730     Dwarf_Error *       /*error*/);
00731 
00732 int dwarf_linebeginstatement(Dwarf_Line /*line*/, 
00733     Dwarf_Bool  *       /*returned_bool*/,
00734     Dwarf_Error*        /*error*/);
00735 
00736 int dwarf_lineendsequence(Dwarf_Line /*line*/,
00737     Dwarf_Bool  *       /*returned_bool*/,
00738     Dwarf_Error*        /*error*/);
00739 
00740 int dwarf_lineno(Dwarf_Line /*line*/, 
00741     Dwarf_Unsigned *    /*returned_lineno*/,
00742     Dwarf_Error*        /*error*/);
00743 
00744 int dwarf_lineaddr(Dwarf_Line /*line*/, 
00745     Dwarf_Addr *        /*returned_addr*/,
00746     Dwarf_Error*        /*error*/);
00747 
00748 int dwarf_lineoff(Dwarf_Line /*line*/, 
00749     Dwarf_Signed  *     /*returned_lineoffset*/,
00750     Dwarf_Error*        /*error*/);
00751 
00752 int dwarf_linesrc(Dwarf_Line /*line*/, 
00753     char   **           /*returned_name*/,
00754     Dwarf_Error*        /*error*/);
00755 
00756 int dwarf_lineblock(Dwarf_Line /*line*/, 
00757     Dwarf_Bool  *       /*returned_bool*/,
00758     Dwarf_Error*        /*error*/);
00759 
00760 /* tertiary interface to line info */
00761 /* Unimplemented */
00762 int dwarf_pclines(Dwarf_Debug /*dbg*/, 
00763     Dwarf_Addr          /*pc*/, 
00764     Dwarf_Line**        /*linebuf*/, 
00765     Dwarf_Signed *      /*linecount*/,
00766     Dwarf_Signed        /*slide*/, 
00767     Dwarf_Error*        /*error*/);
00768 /* end line number operations */
00769 
00770 /* global name space operations (.debug_pubnames access) */
00771 int dwarf_get_globals(Dwarf_Debug /*dbg*/, 
00772     Dwarf_Global**      /*globals*/, 
00773     Dwarf_Signed *      /*number_of_globals*/,
00774     Dwarf_Error*        /*error*/);
00775 
00776 int dwarf_globname(Dwarf_Global /*glob*/, 
00777     char   **           /*returned_name*/,
00778     Dwarf_Error*        /*error*/);
00779 
00780 int dwarf_global_die_offset(Dwarf_Global /*global*/, 
00781     Dwarf_Off*          /*return_offset*/,
00782     Dwarf_Error *       /*error*/);
00783 
00784 int dwarf_global_cu_offset(Dwarf_Global /*global*/, 
00785     Dwarf_Off*          /*return_offset*/,
00786     Dwarf_Error*        /*error*/);
00787 
00788 int dwarf_global_name_offsets(Dwarf_Global /*global*/, 
00789     char   **           /*returned_name*/,
00790     Dwarf_Off*          /*die_offset*/, 
00791     Dwarf_Off*          /*cu_offset*/, 
00792     Dwarf_Error*        /*error*/);
00793 
00794 /* Static function name operations.  */
00795 int dwarf_get_funcs(Dwarf_Debug /*dbg*/,
00796     Dwarf_Func**        /*funcs*/,
00797     Dwarf_Signed *      /*number_of_funcs*/,
00798     Dwarf_Error*        /*error*/);
00799 
00800 int dwarf_funcname(Dwarf_Func /*func*/,
00801     char   **           /*returned_name*/,
00802     Dwarf_Error*        /*error*/);
00803 
00804 int dwarf_func_die_offset(Dwarf_Func /*func*/,
00805     Dwarf_Off*          /*return_offset*/,
00806     Dwarf_Error*        /*error*/);
00807 
00808 int dwarf_func_cu_offset(Dwarf_Func /*func*/,
00809     Dwarf_Off*          /*return_offset*/,
00810     Dwarf_Error*        /*error*/);
00811 
00812 int dwarf_func_name_offsets(Dwarf_Func /*func*/,
00813     char   **           /*returned_name*/,
00814     Dwarf_Off*          /*die_offset*/,
00815     Dwarf_Off*          /*cu_offset*/,
00816     Dwarf_Error*        /*error*/);
00817 
00818 /* User-defined type name operations.  */
00819 int dwarf_get_types(Dwarf_Debug /*dbg*/,
00820     Dwarf_Type**        /*types*/,
00821     Dwarf_Signed *      /*number_of_types*/,
00822     Dwarf_Error*        /*error*/);
00823 
00824 int dwarf_typename(Dwarf_Type /*type*/,
00825     char   **           /*returned_name*/,
00826     Dwarf_Error*        /*error*/);
00827 
00828 int dwarf_type_die_offset(Dwarf_Type /*type*/,
00829     Dwarf_Off*          /*return_offset*/,
00830     Dwarf_Error*        /*error*/);
00831 
00832 int dwarf_type_cu_offset(Dwarf_Type /*type*/,
00833     Dwarf_Off*          /*return_offset*/,
00834     Dwarf_Error*        /*error*/);
00835 
00836 int dwarf_type_name_offsets(Dwarf_Type  /*type*/,
00837     char   **           /*returned_name*/,
00838     Dwarf_Off*          /*die_offset*/,
00839     Dwarf_Off*          /*cu_offset*/,
00840     Dwarf_Error*        /*error*/);
00841 
00842 /* File-scope static variable name operations.  */
00843 int dwarf_get_vars(Dwarf_Debug  /*dbg*/,
00844     Dwarf_Var**         /*vars*/,
00845     Dwarf_Signed *      /*number_of_vars*/,
00846     Dwarf_Error*        /*error*/);
00847 
00848 int dwarf_varname(Dwarf_Var /*var*/,
00849     char   **           /*returned_name*/,
00850     Dwarf_Error*        /*error*/);
00851 
00852 int dwarf_var_die_offset(Dwarf_Var /*var*/,
00853     Dwarf_Off*          /*return_offset*/,
00854     Dwarf_Error*        /*error*/);
00855 
00856 int dwarf_var_cu_offset(Dwarf_Var /*var*/,
00857     Dwarf_Off*          /*return_offset*/,
00858     Dwarf_Error*        /*error*/);
00859 
00860 int dwarf_var_name_offsets(Dwarf_Var /*var*/,
00861     char   **           /*returned_name*/,
00862     Dwarf_Off*          /*die_offset*/,
00863     Dwarf_Off*          /*cu_offset*/,
00864     Dwarf_Error*        /*error*/);
00865 
00866 /* weak name operations.  */
00867 int dwarf_get_weaks(Dwarf_Debug /*dbg*/,
00868     Dwarf_Weak**        /*weaks*/,
00869     Dwarf_Signed *      /*number_of_weaks*/,
00870     Dwarf_Error*        /*error*/);
00871 
00872 int dwarf_weakname(Dwarf_Weak /*weak*/,
00873     char   **           /*returned_name*/,
00874     Dwarf_Error*        /*error*/);
00875 
00876 int dwarf_weak_die_offset(Dwarf_Weak /*weak*/,
00877     Dwarf_Off*          /*return_offset*/,
00878     Dwarf_Error*        /*error*/);
00879 
00880 int dwarf_weak_cu_offset(Dwarf_Weak /*weak*/,
00881     Dwarf_Off*          /*return_offset*/,
00882     Dwarf_Error*        /*error*/);
00883 
00884 int dwarf_weak_name_offsets(Dwarf_Weak  /*weak*/,
00885     char   **           /*returned_name*/,
00886     Dwarf_Off*          /*die_offset*/,
00887     Dwarf_Off*          /*cu_offset*/,
00888     Dwarf_Error*        /*error*/);
00889 
00890 /* location list section operation.  (.debug_loc access) */
00891 /* Unimplemented. */
00892 int dwarf_get_loclist_entry(Dwarf_Debug /*dbg*/, 
00893     Dwarf_Unsigned      /*offset*/, 
00894     Dwarf_Addr*         /*hipc*/, 
00895     Dwarf_Addr*         /*lopc*/, 
00896     Dwarf_Ptr*          /*data*/, 
00897     Dwarf_Unsigned*     /*entry_len*/, 
00898     Dwarf_Unsigned*     /*next_entry*/, 
00899     Dwarf_Error*        /*error*/);
00900 
00901 /* abbreviation section operations */
00902 int dwarf_get_abbrev(Dwarf_Debug /*dbg*/, 
00903     Dwarf_Unsigned      /*offset*/, 
00904     Dwarf_Abbrev  *     /*returned_abbrev*/,
00905     Dwarf_Unsigned*     /*length*/, 
00906     Dwarf_Unsigned*     /*attr_count*/, 
00907     Dwarf_Error*        /*error*/);
00908 
00909 int dwarf_get_abbrev_tag(Dwarf_Abbrev /*abbrev*/, 
00910     Dwarf_Half*        /*return_tag_number*/,
00911     Dwarf_Error*        /*error*/);
00912 int dwarf_get_abbrev_code(Dwarf_Abbrev /*abbrev*/, 
00913     Dwarf_Unsigned*        /*return_code_number*/,
00914     Dwarf_Error*        /*error*/);
00915 
00916 int dwarf_get_abbrev_children_flag(Dwarf_Abbrev /*abbrev*/, 
00917     Dwarf_Signed*        /*return_flag*/,
00918     Dwarf_Error*        /*error*/);
00919 
00920 int dwarf_get_abbrev_entry(Dwarf_Abbrev /*abbrev*/, 
00921     Dwarf_Signed        /*index*/, 
00922     Dwarf_Half  *       /*returned_attr_num*/,
00923     Dwarf_Signed*       /*form*/, 
00924     Dwarf_Off*          /*offset*/, 
00925     Dwarf_Error*        /*error*/);
00926 
00927 /* consumer string section operation */
00928 int dwarf_get_str(Dwarf_Debug /*dbg*/, 
00929     Dwarf_Off           /*offset*/, 
00930     char**              /*string*/, 
00931     Dwarf_Signed *      /*strlen_of_string*/,
00932     Dwarf_Error*        /*error*/);
00933 
00934 /* Consumer op on  gnu .eh_frame info */
00935 int dwarf_get_fde_list_eh(
00936     Dwarf_Debug        /*dbg*/,
00937     Dwarf_Cie       ** /*cie_data*/,
00938     Dwarf_Signed    *  /*cie_element_count*/,
00939     Dwarf_Fde       ** /*fde_data*/,
00940     Dwarf_Signed    *  /*fde_element_count*/,
00941     Dwarf_Error     *  /*error*/);
00942 
00943 
00944 /* consumer operations on frame info: .debug_frame */
00945 int dwarf_get_fde_list(Dwarf_Debug /*dbg*/, 
00946     Dwarf_Cie**         /*cie_data*/, 
00947     Dwarf_Signed*       /*cie_element_count*/, 
00948     Dwarf_Fde**         /*fde_data*/, 
00949     Dwarf_Signed*       /*fde_element_count*/, 
00950     Dwarf_Error*        /*error*/);
00951 
00952 
00953 int dwarf_get_fde_range(Dwarf_Fde /*fde*/, 
00954     Dwarf_Addr*         /*low_pc*/, 
00955     Dwarf_Unsigned*     /*func_length*/, 
00956     Dwarf_Ptr*          /*fde_bytes*/, 
00957     Dwarf_Unsigned*     /*fde_byte_length*/, 
00958     Dwarf_Off*          /*cie_offset*/, 
00959     Dwarf_Signed*       /*cie_index*/, 
00960     Dwarf_Off*          /*fde_offset*/, 
00961     Dwarf_Error*        /*error*/);
00962 
00963 int dwarf_get_fde_exception_info(Dwarf_Fde /*fde*/,
00964     Dwarf_Signed*       /* offset_into_exception_tables */,
00965     Dwarf_Error*        /*error*/);
00966 
00967 int dwarf_get_cie_of_fde(Dwarf_Fde /*fde*/,
00968     Dwarf_Cie *         /*cie_returned*/,
00969     Dwarf_Error*        /*error*/);
00970 
00971 int dwarf_get_cie_info(Dwarf_Cie /*cie*/, 
00972     Dwarf_Unsigned *    /*bytes_in_cie*/,
00973     Dwarf_Small*        /*version*/, 
00974     char        **      /*augmenter*/,
00975     Dwarf_Unsigned*     /*code_alignment_factor*/, 
00976     Dwarf_Signed*       /*data_alignment_factor*/, 
00977     Dwarf_Half*         /*return_address_register_rule*/, 
00978     Dwarf_Ptr*          /*initial_instructions*/, 
00979     Dwarf_Unsigned*     /*initial_instructions_length*/, 
00980     Dwarf_Error*        /*error*/);
00981 
00982 int dwarf_get_fde_instr_bytes(Dwarf_Fde /*fde*/, 
00983     Dwarf_Ptr * /*outinstrs*/, Dwarf_Unsigned * /*outlen*/, 
00984     Dwarf_Error * /*error*/);
00985 
00986 int dwarf_get_fde_info_for_all_regs(Dwarf_Fde /*fde*/, 
00987     Dwarf_Addr          /*pc_requested*/,
00988     Dwarf_Regtable*     /*reg_table*/,
00989     Dwarf_Addr*         /*row_pc*/,
00990     Dwarf_Error*        /*error*/);
00991 
00992 int dwarf_get_fde_info_for_reg(Dwarf_Fde /*fde*/, 
00993     Dwarf_Half          /*table_column*/, 
00994     Dwarf_Addr          /*pc_requested*/, 
00995     Dwarf_Signed*       /*offset_relevant*/,
00996     Dwarf_Signed*       /*register*/,  
00997     Dwarf_Signed*       /*offset*/, 
00998     Dwarf_Addr*         /*row_pc*/, 
00999     Dwarf_Error*        /*error*/);
01000 
01001 int dwarf_get_fde_for_die(Dwarf_Debug /*dbg*/, 
01002     Dwarf_Die           /*subr_die */, 
01003     Dwarf_Fde  *        /*returned_fde*/,
01004     Dwarf_Error*        /*error*/);
01005 
01006 int dwarf_get_fde_n(Dwarf_Fde* /*fde_data*/, 
01007     Dwarf_Unsigned      /*fde_index*/, 
01008     Dwarf_Fde  *        /*returned_fde*/,
01009     Dwarf_Error*        /*error*/);
01010 
01011 int dwarf_get_fde_at_pc(Dwarf_Fde* /*fde_data*/, 
01012     Dwarf_Addr          /*pc_of_interest*/, 
01013     Dwarf_Fde  *        /*returned_fde*/,
01014     Dwarf_Addr*         /*lopc*/, 
01015     Dwarf_Addr*         /*hipc*/, 
01016     Dwarf_Error*        /*error*/);
01017 
01018 int dwarf_expand_frame_instructions(Dwarf_Debug /*dbg*/, 
01019     Dwarf_Ptr           /*instruction*/, 
01020     Dwarf_Unsigned      /*i_length*/, 
01021     Dwarf_Frame_Op**    /*returned_op_list*/, 
01022     Dwarf_Signed*       /*op_count*/,
01023     Dwarf_Error*        /*error*/);
01024 
01025 /* Operations on .debug_aranges. */
01026 int dwarf_get_aranges(Dwarf_Debug /*dbg*/, 
01027     Dwarf_Arange**      /*aranges*/, 
01028     Dwarf_Signed *      /*arange_count*/,
01029     Dwarf_Error*        /*error*/);
01030 
01031 
01032 
01033 int dwarf_get_arange(
01034     Dwarf_Arange*       /*aranges*/, 
01035     Dwarf_Unsigned      /*arange_count*/, 
01036     Dwarf_Addr          /*address*/, 
01037     Dwarf_Arange *      /*returned_arange*/,
01038     Dwarf_Error*        /*error*/);
01039 
01040 int dwarf_get_cu_die_offset(
01041     Dwarf_Arange        /*arange*/, 
01042     Dwarf_Off*          /*return_offset*/,
01043     Dwarf_Error*        /*error*/);
01044 
01045 int dwarf_get_arange_info(
01046     Dwarf_Arange        /*arange*/, 
01047     Dwarf_Addr*         /*start*/, 
01048     Dwarf_Unsigned*     /*length*/, 
01049     Dwarf_Off*          /*cu_die_offset*/, 
01050     Dwarf_Error*        /*error*/);
01051 
01052 
01053 /* consumer .debug_macinfo information interface.
01054 */
01055 struct Dwarf_Macro_Details_s {
01056   Dwarf_Off    dmd_offset; /* offset, in the section,
01057                               of this macro info */
01058   Dwarf_Small  dmd_type;   /* the type, DW_MACINFO_define etc*/
01059   Dwarf_Signed dmd_lineno; /* the source line number where
01060                               applicable and vend_def # if
01061                               vendor_extension op
01062                            */
01063 
01064   Dwarf_Signed dmd_fileindex;/* the source file index:
01065                               applies to define undef start_file
01066                              */
01067   char *       dmd_macro;  /* macro name (with value for defineop)
01068                               string from vendor ext
01069                            */
01070 };
01071 
01072 /* _dwarf_print_lines is for use by dwarfdump: it prints
01073    line info to stdout.
01074 */
01075 int _dwarf_print_lines(Dwarf_Die cu_die,Dwarf_Error * /*error*/);
01076 
01077 /* _dwarf_ld_sort_lines is for use solely by ld for
01078    rearranging lines in .debug_line in a .o created with a text
01079    section per function.  
01080                 -OPT:procedure_reorder=ON
01081    where ld-cord (cord(1)ing by ld, 
01082    not by cord(1)) may have changed the function order.
01083 */
01084 int _dwarf_ld_sort_lines(
01085         void * orig_buffer,
01086         unsigned long   buffer_len,
01087         int is_64_bit,
01088         int *any_change,
01089         int * err_code);
01090 
01091 /* Used by dwarfdump -v to print offsets, for debugging
01092    dwarf info
01093 */
01094 int _dwarf_fde_section_offset(Dwarf_Debug dbg,Dwarf_Fde in_fde,
01095         Dwarf_Off *fde_off, Dwarf_Off *cie_off,
01096         Dwarf_Error *err);
01097 
01098 /* Used by dwarfdump -v to print offsets, for debugging
01099    dwarf info
01100 */
01101 int _dwarf_cie_section_offset(Dwarf_Debug dbg,Dwarf_Cie in_cie,
01102         Dwarf_Off *cie_off,
01103         Dwarf_Error *err);
01104 
01105 
01106 
01107 
01108 typedef struct Dwarf_Macro_Details_s Dwarf_Macro_Details;
01109 
01110 int dwarf_get_macro(Dwarf_Debug /*dbg*/,
01111     char *        /*requested_macro_name*/,
01112     Dwarf_Addr    /*pc_of_request*/,
01113     char **       /*returned_macro_value*/,
01114     Dwarf_Error * /*error*/);
01115 
01116 int dwarf_get_all_defined_macros(Dwarf_Debug /*dbg*/,
01117     Dwarf_Addr     /*pc_of_request*/,
01118     Dwarf_Signed * /*returned_count*/,
01119     char ***       /*returned_pointers_to_macros*/,
01120     Dwarf_Error *  /*error*/);
01121 
01122 char *dwarf_find_macro_value_start(char * /*macro_string*/);
01123 
01124 int dwarf_get_macro_details(Dwarf_Debug /*dbg*/,
01125     Dwarf_Off              /*macro_offset*/,
01126     Dwarf_Unsigned         /*maximum_count*/,
01127     Dwarf_Signed         * /*entry_count*/,
01128     Dwarf_Macro_Details ** /*details*/,
01129     Dwarf_Error *          /*err*/);
01130 
01131 
01132 int dwarf_get_address_size(Dwarf_Debug /*dbg*/,
01133         Dwarf_Half  * /*addr_size*/,
01134         Dwarf_Error * /*error*/);
01135 
01136 /* utility operations */
01137 Dwarf_Unsigned dwarf_errno(Dwarf_Error  /*error*/);
01138 
01139 char* dwarf_errmsg(Dwarf_Error  /*error*/);
01140 
01141 /* stringcheck zero is default and means do all
01142 ** string length validity checks.
01143 ** Call with parameter value 1 to turn off many such checks (and
01144 ** increase performance).
01145 ** Call with zero for safest running.
01146 ** Actual value saved and returned is only 8 bits! Upper bits
01147 ** ignored by libdwarf (and zero on return).
01148 ** Returns previous value.
01149 */
01150 int dwarf_set_stringcheck(int /*stringcheck*/);
01151 
01152 /* Unimplemented */
01153 Dwarf_Handler dwarf_seterrhand(Dwarf_Debug /*dbg*/, Dwarf_Handler /*errhand*/);
01154 
01155 /* Unimplemented */
01156 Dwarf_Ptr dwarf_seterrarg(Dwarf_Debug /*dbg*/, Dwarf_Ptr /*errarg*/);
01157 
01158 void dwarf_dealloc(Dwarf_Debug /*dbg*/, void* /*space*/, 
01159     Dwarf_Unsigned /*type*/);
01160 
01161 /* DWARF Producer Interface */
01162 
01163 typedef int (*Dwarf_Callback_Func)(
01164     char* /*name*/, 
01165     int                 /*size*/, 
01166     Dwarf_Unsigned      /*type*/,
01167     Dwarf_Unsigned      /*flags*/, 
01168     Dwarf_Unsigned      /*link*/, 
01169     Dwarf_Unsigned      /*info*/, 
01170     int*                /*sect name index*/, 
01171     int*                /*error*/);
01172 
01173 Dwarf_P_Debug dwarf_producer_init(
01174     Dwarf_Unsigned      /*creation_flags*/, 
01175     Dwarf_Callback_Func /*func*/,
01176     Dwarf_Handler       /*errhand*/, 
01177     Dwarf_Ptr           /*errarg*/, 
01178     Dwarf_Error*        /*error*/);
01179 
01180 typedef int (*Dwarf_Callback_Func_b)(
01181     char*               /*name*/,
01182     int                 /*size*/,
01183     Dwarf_Unsigned      /*type*/,
01184     Dwarf_Unsigned      /*flags*/,
01185     Dwarf_Unsigned      /*link*/,
01186     Dwarf_Unsigned      /*info*/,
01187     Dwarf_Unsigned*     /*sect_name_index*/,
01188     int*                /*error*/);
01189 
01190 
01191 Dwarf_P_Debug dwarf_producer_init_b(
01192     Dwarf_Unsigned        /*flags*/,
01193     Dwarf_Callback_Func_b /*func*/,
01194     Dwarf_Handler         /*errhand*/,
01195     Dwarf_Ptr             /*errarg*/,
01196     Dwarf_Error *         /*error*/);
01197 
01198 
01199 Dwarf_Signed dwarf_transform_to_disk_form(Dwarf_P_Debug /*dbg*/,
01200     Dwarf_Error*        /*error*/);
01201 
01202 Dwarf_Ptr dwarf_get_section_bytes(Dwarf_P_Debug /*dbg*/, 
01203     Dwarf_Signed        /*dwarf_section*/,
01204     Dwarf_Signed*       /*elf_section_index*/, 
01205     Dwarf_Unsigned*     /*length*/, 
01206     Dwarf_Error*        /*error*/);
01207 
01208 int  dwarf_get_relocation_info_count(
01209         Dwarf_P_Debug    /*dbg*/,
01210         Dwarf_Unsigned * /*count_of_relocation_sections*/,
01211         int *            /*drd_buffer_version*/,
01212         Dwarf_Error*     /*error*/);
01213 
01214 int dwarf_get_relocation_info(
01215         Dwarf_P_Debug           /*dbg*/,
01216         Dwarf_Signed          * /*elf_section_index*/,
01217         Dwarf_Signed          * /*elf_section_index_link*/,
01218         Dwarf_Unsigned        * /*relocation_buffer_count*/,
01219         Dwarf_Relocation_Data * /*reldata_buffer*/,
01220         Dwarf_Error*            /*error*/);
01221 
01222 /* v1:  no drd_length field, enum explicit */
01223 /* v2:  has the drd_length field, enum value in uchar member */
01224 #define DWARF_DRD_BUFFER_VERSION 2
01225 
01226 void dwarf_reset_section_bytes(Dwarf_P_Debug /*dbg*/);
01227 
01228 Dwarf_Unsigned dwarf_producer_finish(Dwarf_P_Debug /*dbg*/, 
01229     Dwarf_Error* /*error*/);
01230 
01231 /* Producer attribute addition functions. */
01232 Dwarf_P_Attribute dwarf_add_AT_targ_address(Dwarf_P_Debug /*dbg*/, 
01233     Dwarf_P_Die         /*ownerdie*/, 
01234     Dwarf_Half          /*attr*/, 
01235     Dwarf_Unsigned      /*pc_value*/, 
01236     Dwarf_Signed        /*sym_index*/, 
01237     Dwarf_Error*        /*error*/);
01238 
01239 Dwarf_P_Attribute dwarf_add_AT_targ_address_b(Dwarf_P_Debug /*dbg*/, 
01240     Dwarf_P_Die         /*ownerdie*/, 
01241     Dwarf_Half          /*attr*/, 
01242     Dwarf_Unsigned      /*pc_value*/, 
01243     Dwarf_Unsigned      /*sym_index*/, 
01244     Dwarf_Error*        /*error*/);
01245 
01246 Dwarf_P_Attribute dwarf_add_AT_unsigned_const(Dwarf_P_Debug /*dbg*/, 
01247     Dwarf_P_Die         /*ownerdie*/, 
01248     Dwarf_Half          /*attr*/, 
01249     Dwarf_Unsigned      /*value*/, 
01250     Dwarf_Error*        /*error*/);
01251 
01252 Dwarf_P_Attribute dwarf_add_AT_signed_const(Dwarf_P_Debug /*dbg*/, 
01253     Dwarf_P_Die         /*ownerdie*/, 
01254     Dwarf_Half          /*attr*/, 
01255     Dwarf_Signed        /*value*/, 
01256     Dwarf_Error*        /*error*/);
01257 
01258 Dwarf_P_Attribute dwarf_add_AT_reference(Dwarf_P_Debug /*dbg*/, 
01259     Dwarf_P_Die         /*ownerdie*/, 
01260     Dwarf_Half          /*attr*/, 
01261     Dwarf_P_Die         /*otherdie*/, 
01262     Dwarf_Error*        /*error*/);
01263 
01264 Dwarf_P_Attribute dwarf_add_AT_const_value_string(Dwarf_P_Die /*ownerdie*/, 
01265     char*               /*string_value*/, 
01266     Dwarf_Error*        /*error*/);
01267 
01268 Dwarf_P_Attribute dwarf_add_AT_location_expr(Dwarf_P_Debug /*dbg*/, 
01269     Dwarf_P_Die         /*ownerdie*/, 
01270     Dwarf_Half          /*attr*/, 
01271     Dwarf_P_Expr        /*loc_expr*/, 
01272     Dwarf_Error*        /*error*/);
01273 
01274 Dwarf_P_Attribute dwarf_add_AT_string(Dwarf_P_Debug /*dbg*/, 
01275     Dwarf_P_Die         /*ownerdie*/, 
01276     Dwarf_Half          /*attr*/, 
01277     char*               /*string*/, 
01278     Dwarf_Error*        /*error*/);
01279 
01280 Dwarf_P_Attribute dwarf_add_AT_flag(Dwarf_P_Debug /*dbg*/, 
01281     Dwarf_P_Die         /*ownerdie*/, 
01282     Dwarf_Half          /*attr*/, 
01283     Dwarf_Small         /*flag*/, 
01284     Dwarf_Error*        /*error*/);
01285 
01286 Dwarf_P_Attribute dwarf_add_AT_producer(Dwarf_P_Die /*ownerdie*/, 
01287     char*               /*producer_string*/, 
01288     Dwarf_Error*        /*error*/);
01289 
01290 Dwarf_P_Attribute dwarf_add_AT_const_value_signedint(Dwarf_P_Die /*ownerdie*/, 
01291     Dwarf_Signed        /*signed_value*/, 
01292     Dwarf_Error*        /*error*/);
01293 
01294 Dwarf_P_Attribute dwarf_add_AT_const_value_unsignedint(
01295     Dwarf_P_Die         /*ownerdie*/, 
01296     Dwarf_Unsigned      /*unsigned_value*/, 
01297     Dwarf_Error*        /*error*/);
01298 
01299 Dwarf_P_Attribute dwarf_add_AT_comp_dir(Dwarf_P_Die /*ownerdie*/, 
01300     char*               /*current_working_directory*/, 
01301     Dwarf_Error*        /*error*/);
01302 
01303 Dwarf_P_Attribute dwarf_add_AT_name(Dwarf_P_Die /*die*/,
01304     char*               /*name*/,
01305     Dwarf_Error*        /*error*/);
01306 
01307 /* Producer line creation functions (.debug_line) */
01308 Dwarf_Unsigned dwarf_add_directory_decl(Dwarf_P_Debug /*dbg*/, 
01309     char*               /*name*/, 
01310     Dwarf_Error*        /*error*/);
01311 
01312 Dwarf_Unsigned dwarf_add_file_decl(Dwarf_P_Debug /*dbg*/, 
01313     char*               /*name*/,
01314     Dwarf_Unsigned      /*dir_index*/, 
01315     Dwarf_Unsigned      /*time_last_modified*/, 
01316     Dwarf_Unsigned      /*length*/, 
01317     Dwarf_Error*        /*error*/);
01318 
01319 Dwarf_Unsigned dwarf_add_line_entry(Dwarf_P_Debug /*dbg*/, 
01320     Dwarf_Unsigned      /*file_index*/, 
01321     Dwarf_Addr          /*code_address*/, 
01322     Dwarf_Unsigned      /*lineno*/, 
01323     Dwarf_Signed        /*column_number*/, 
01324     Dwarf_Bool          /*is_source_stmt_begin*/, 
01325     Dwarf_Bool          /*is_basic_block_begin*/, 
01326     Dwarf_Error*        /*error*/);
01327 
01328 Dwarf_Unsigned dwarf_lne_set_address(Dwarf_P_Debug /*dbg*/, 
01329     Dwarf_Unsigned      /*offset*/, 
01330     Dwarf_Unsigned      /*symbol_index*/, 
01331     Dwarf_Error*        /*error*/);
01332 
01333 Dwarf_Unsigned dwarf_lne_end_sequence(Dwarf_P_Debug /*dbg*/, 
01334     Dwarf_Addr          /*end_address*/,
01335     Dwarf_Error*        /*error*/);
01336 
01337 /* Producer .debug_frame functions */
01338 Dwarf_Unsigned dwarf_add_frame_cie(Dwarf_P_Debug /*dbg*/, 
01339     char*               /*augmenter*/, 
01340     Dwarf_Small         /*code_alignent_factor*/, 
01341     Dwarf_Small         /*data_alignment_factor*/, 
01342     Dwarf_Small         /*return_address_reg*/, 
01343     Dwarf_Ptr           /*initialization_bytes*/, 
01344     Dwarf_Unsigned      /*init_byte_len*/, 
01345     Dwarf_Error*        /*error*/);
01346 
01347 Dwarf_Unsigned dwarf_add_frame_fde( 
01348     Dwarf_P_Debug       /*dbg*/,
01349     Dwarf_P_Fde         /*fde*/, 
01350     Dwarf_P_Die         /*corresponding subprogram die*/,
01351     Dwarf_Unsigned      /*cie_to_use*/, 
01352     Dwarf_Unsigned      /*virt_addr_of_described_code*/, 
01353     Dwarf_Unsigned      /*length_of_code*/, 
01354     Dwarf_Unsigned      /*symbol_index*/, 
01355     Dwarf_Error*        /*error*/);
01356 
01357 Dwarf_Unsigned dwarf_add_frame_fde_b(
01358         Dwarf_P_Debug  /*dbg*/,
01359         Dwarf_P_Fde    /*fde*/,
01360         Dwarf_P_Die    /*die*/,
01361         Dwarf_Unsigned /*cie*/,
01362         Dwarf_Addr     /*virt_addr*/,
01363         Dwarf_Unsigned /*code_len*/,
01364         Dwarf_Unsigned /*sym_idx*/,
01365         Dwarf_Unsigned /*sym_idx_of_end*/,
01366         Dwarf_Addr     /*offset_from_end_sym*/,
01367         Dwarf_Error*   /*error*/);
01368 
01369 Dwarf_Unsigned dwarf_add_frame_info_b( 
01370     Dwarf_P_Debug dbg   /*dbg*/,
01371     Dwarf_P_Fde         /*fde*/,
01372     Dwarf_P_Die         /*die*/,
01373     Dwarf_Unsigned      /*cie*/,
01374     Dwarf_Addr          /*virt_addr*/,
01375     Dwarf_Unsigned      /*code_len*/,
01376     Dwarf_Unsigned      /*symidx*/,
01377     Dwarf_Unsigned      /* end_symbol */,
01378     Dwarf_Addr          /* offset_from_end_symbol */,
01379     Dwarf_Signed        /*offset_into_exception_tables*/,
01380     Dwarf_Unsigned      /*exception_table_symbol*/,
01381     Dwarf_Error*        /*error*/);
01382 
01383 Dwarf_Unsigned dwarf_add_frame_info( 
01384     Dwarf_P_Debug dbg   /*dbg*/,
01385     Dwarf_P_Fde         /*fde*/,
01386     Dwarf_P_Die         /*die*/,
01387     Dwarf_Unsigned      /*cie*/,
01388     Dwarf_Addr          /*virt_addr*/,
01389     Dwarf_Unsigned      /*code_len*/,
01390     Dwarf_Unsigned      /*symidx*/,
01391     Dwarf_Signed        /*offset_into_exception_tables*/,
01392     Dwarf_Unsigned      /*exception_table_symbol*/,
01393     Dwarf_Error*        /*error*/);
01394 
01395 Dwarf_P_Fde dwarf_add_fde_inst(
01396     Dwarf_P_Fde         /*fde*/,
01397     Dwarf_Small         /*op*/, 
01398     Dwarf_Unsigned      /*val1*/, 
01399     Dwarf_Unsigned      /*val2*/, 
01400     Dwarf_Error*        /*error*/);
01401 
01402 Dwarf_P_Fde dwarf_new_fde(Dwarf_P_Debug /*dbg*/, Dwarf_Error* /*error*/);
01403 
01404 Dwarf_P_Fde dwarf_fde_cfa_offset(
01405     Dwarf_P_Fde         /*fde*/, 
01406     Dwarf_Unsigned      /*register_number*/, 
01407     Dwarf_Signed        /*offset*/, 
01408     Dwarf_Error*        /*error*/);
01409 
01410 /* die creation & addition routines */
01411 Dwarf_P_Die dwarf_new_die(
01412     Dwarf_P_Debug       /*dbg*/,
01413     Dwarf_Tag           /*tag*/,
01414     Dwarf_P_Die         /*parent*/, 
01415     Dwarf_P_Die         /*child*/, 
01416     Dwarf_P_Die         /*left */,
01417     Dwarf_P_Die         /*right*/,
01418     Dwarf_Error*        /*error*/);
01419 
01420 Dwarf_Unsigned dwarf_add_die_to_debug(
01421     Dwarf_P_Debug       /*dbg*/,
01422     Dwarf_P_Die         /*die*/,
01423     Dwarf_Error*        /*error*/);
01424 
01425 Dwarf_P_Die dwarf_die_link(
01426     Dwarf_P_Die         /*die*/,
01427     Dwarf_P_Die         /*parent*/,
01428     Dwarf_P_Die         /*child*/, 
01429     Dwarf_P_Die         /*left*/,
01430     Dwarf_P_Die         /*right*/, 
01431     Dwarf_Error*        /*error*/);
01432 
01433 /* Operations to create location expressions. */
01434 Dwarf_P_Expr dwarf_new_expr(Dwarf_P_Debug /*dbg*/, Dwarf_Error* /*error*/);
01435 
01436 Dwarf_Unsigned dwarf_add_expr_gen(
01437     Dwarf_P_Expr        /*expr*/, 
01438     Dwarf_Small         /*opcode*/, 
01439     Dwarf_Unsigned      /*val1*/, 
01440     Dwarf_Unsigned      /*val2*/, 
01441     Dwarf_Error*        /*error*/);
01442 
01443 Dwarf_Unsigned dwarf_add_expr_addr(
01444     Dwarf_P_Expr        /*expr*/, 
01445     Dwarf_Unsigned      /*addr*/, 
01446     Dwarf_Signed        /*sym_index*/, 
01447     Dwarf_Error*        /*error*/);
01448 
01449 Dwarf_Unsigned dwarf_add_expr_addr_b(
01450     Dwarf_P_Expr        /*expr*/,
01451     Dwarf_Unsigned      /*addr*/,
01452     Dwarf_Unsigned      /*sym_index*/,
01453     Dwarf_Error*        /*error*/);
01454 
01455 Dwarf_Unsigned dwarf_expr_current_offset(
01456     Dwarf_P_Expr /*expr*/, 
01457     Dwarf_Error* /*error*/);
01458 
01459 Dwarf_Addr dwarf_expr_into_block(
01460     Dwarf_P_Expr        /*expr*/, 
01461     Dwarf_Unsigned*     /*length*/, 
01462     Dwarf_Error*        /*error*/);
01463 
01464 Dwarf_Unsigned dwarf_add_arange(Dwarf_P_Debug /*dbg*/, 
01465     Dwarf_Addr          /*begin_address*/, 
01466     Dwarf_Unsigned      /*length*/, 
01467     Dwarf_Signed        /*symbol_index*/, 
01468     Dwarf_Error*        /*error*/);
01469 
01470 Dwarf_Unsigned dwarf_add_arange_b(
01471         Dwarf_P_Debug  /*dbg*/,
01472         Dwarf_Addr     /*begin_address*/,
01473         Dwarf_Unsigned /*length*/,
01474         Dwarf_Unsigned /*symbol_index*/,
01475         Dwarf_Unsigned /*end_symbol_index*/,
01476         Dwarf_Addr     /*offset_from_end_symbol*/,
01477         Dwarf_Error *  /*error*/);
01478 
01479 Dwarf_Unsigned dwarf_add_pubname(
01480     Dwarf_P_Debug       /*dbg*/, 
01481     Dwarf_P_Die         /*die*/, 
01482     char*               /*pubname_name*/, 
01483     Dwarf_Error*        /*error*/);
01484 
01485 Dwarf_Unsigned dwarf_add_funcname(
01486     Dwarf_P_Debug       /*dbg*/, 
01487     Dwarf_P_Die         /*die*/, 
01488     char*               /*func_name*/, 
01489     Dwarf_Error*        /*error*/);
01490 
01491 Dwarf_Unsigned dwarf_add_typename(
01492     Dwarf_P_Debug       /*dbg*/, 
01493     Dwarf_P_Die         /*die*/, 
01494     char*               /*type_name*/, 
01495     Dwarf_Error*        /*error*/);
01496 
01497 Dwarf_Unsigned dwarf_add_varname(
01498     Dwarf_P_Debug       /*dbg*/, 
01499     Dwarf_P_Die         /*die*/, 
01500     char*               /*var_name*/, 
01501     Dwarf_Error*        /*error*/);
01502 
01503 Dwarf_Unsigned dwarf_add_weakname(
01504     Dwarf_P_Debug       /*dbg*/, 
01505     Dwarf_P_Die         /*die*/, 
01506     char*               /*weak_name*/, 
01507     Dwarf_Error*        /*error*/);
01508 
01509 /* .debug_macinfo producer functions
01510    Functions must be called in right order: the section is output
01511    In the order these are presented.
01512 */
01513 int dwarf_def_macro(Dwarf_P_Debug /*dbg*/,
01514     Dwarf_Unsigned  /*line*/,
01515     char *          /*macname, with (arglist), no space before (*/, 
01516     char *          /*macvalue*/,
01517     Dwarf_Error*    /*error*/);
01518 
01519 int dwarf_undef_macro(Dwarf_P_Debug /*dbg*/,
01520     Dwarf_Unsigned  /*line*/,
01521     char *          /*macname, no arglist, of course*/,
01522     Dwarf_Error*    /*error*/);
01523 
01524 int dwarf_start_macro_file(Dwarf_P_Debug /*dbg*/,
01525     Dwarf_Unsigned /*fileindex*/,
01526     Dwarf_Unsigned /*linenumber*/,
01527     Dwarf_Error*   /*error*/);
01528 
01529 int dwarf_end_macro_file(Dwarf_P_Debug /*dbg*/,
01530     Dwarf_Error*   /*error*/);
01531 
01532 int dwarf_vendor_ext(Dwarf_P_Debug /*dbg*/,
01533     Dwarf_Unsigned /*constant*/,
01534     char *         /*string*/,
01535     Dwarf_Error*   /*error*/);
01536 
01537 /* end macinfo producer functions */
01538 
01539 
01540 void dwarf_p_dealloc(void* /*space*/, Dwarf_Unsigned /*type*/);
01541 
01542 int dwarf_attr_offset(Dwarf_Die /*die*/,
01543     Dwarf_Attribute /*attr of above die*/,
01544     Dwarf_Off     * /*returns offset thru this ptr */,
01545     Dwarf_Error   * /*error*/);
01546 
01547 
01548 #ifdef __cplusplus
01549 }
01550 #endif
01551 #endif /* _LIBDWARF_H */
01552 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines