Blame libdwarf/dwarf_frame.h

Packit cdaae3
/*
Packit cdaae3
Packit cdaae3
  Copyright (C) 2000, 2004, 2006 Silicon Graphics, Inc.  All Rights Reserved.
Packit cdaae3
  Portions Copyright (C) 2011 David Anderson. All Rights Reserved.
Packit cdaae3
Packit cdaae3
  This program is free software; you can redistribute it and/or modify it
Packit cdaae3
  under the terms of version 2.1 of the GNU Lesser General Public License
Packit cdaae3
  as published by the Free Software Foundation.
Packit cdaae3
Packit cdaae3
  This program is distributed in the hope that it would be useful, but
Packit cdaae3
  WITHOUT ANY WARRANTY; without even the implied warranty of
Packit cdaae3
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Packit cdaae3
Packit cdaae3
  Further, this software is distributed without any warranty that it is
Packit cdaae3
  free of the rightful claim of any third person regarding infringement
Packit cdaae3
  or the like.  Any license provided herein, whether implied or
Packit cdaae3
  otherwise, applies only to this software file.  Patent licenses, if
Packit cdaae3
  any, provided herein do not apply to combinations of this program with
Packit cdaae3
  other software, or any other product whatsoever.
Packit cdaae3
Packit cdaae3
  You should have received a copy of the GNU Lesser General Public
Packit cdaae3
  License along with this program; if not, write the Free Software
Packit cdaae3
  Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
Packit cdaae3
  USA.
Packit cdaae3
Packit cdaae3
*/
Packit cdaae3
Packit cdaae3
Packit cdaae3
Packit cdaae3
/*  The dwarf 2.0 standard dictates that only the following
Packit cdaae3
    fields can be read when an unexpected augmentation string
Packit cdaae3
    (in the cie) is encountered: CIE length, CIE_id, version and
Packit cdaae3
    augmentation; FDE: length, CIE pointer, initial location and
Packit cdaae3
    address range. Unfortunately, with the above restrictions, it
Packit cdaae3
    is impossible to read the instruction table from a CIE or a FDE
Packit cdaae3
    when a new augmentation string is encountered.
Packit cdaae3
    To fix this problem, the following layout is used, if the
Packit cdaae3
    augmentation string starts with the string "z".
Packit cdaae3
        CIE                        FDE
Packit cdaae3
        length                     length
Packit cdaae3
        CIE_id                     CIE_pointer
Packit cdaae3
        version                    initial_location
Packit cdaae3
        augmentation               address_range
Packit cdaae3
Packit cdaae3
        -                          length_of_augmented_fields (*NEW*)
Packit cdaae3
        code_alignment_factor      Any new fields as necessary
Packit cdaae3
        data_alignment_factor      instruction_table
Packit cdaae3
        return_address
Packit cdaae3
        length_of_augmented fields
Packit cdaae3
        Any new fields as necessary
Packit cdaae3
        initial_instructions
Packit cdaae3
Packit cdaae3
    The type of all the old data items are the same as what is
Packit cdaae3
    described in dwarf 2.0 standard. The length_of_augmented_fields
Packit cdaae3
    is an LEB128 data item that denotes the size (in bytes) of
Packit cdaae3
    the augmented fields (not including the size of
Packit cdaae3
    "length_of_augmented_fields" itself).
Packit cdaae3
Packit cdaae3
    Handling of cie augmentation strings is necessarly a heuristic.
Packit cdaae3
    See dwarf_frame.c for the currently known augmentation strings.
Packit cdaae3
Packit cdaae3
Packit cdaae3
    ---START SGI-ONLY COMMENT:
Packit cdaae3
    SGI-IRIX versions of cie or fde  were intended to use "z1", "z2" as the
Packit cdaae3
    augmenter strings if required for new augmentation.
Packit cdaae3
    However, that never happened (as of March 2005).
Packit cdaae3
Packit cdaae3
    The fde's augmented by the string "z" have a new field
Packit cdaae3
    (signed constant, 4 byte field)
Packit cdaae3
    called offset_into_exception_tables, following the
Packit cdaae3
    length_of_augmented field.   This field contains an offset
Packit cdaae3
    into the "_MIPS_eh_region", which describes
Packit cdaae3
    the IRIX CC exception handling tables.
Packit cdaae3
    ---END SGI-ONLY COMMENT
Packit cdaae3
Packit cdaae3
Packit cdaae3
    GNU .eh_frame has an augmentation string of z[RLP]* (gcc 3.4)
Packit cdaae3
    The similarity to IRIX 'z' (and proposed but never
Packit cdaae3
    implemented IRIX z1, z2 etc) was confusing things.
Packit cdaae3
    If the section is .eh_frame then 'z' means GNU exception
Packit cdaae3
    information 'Augmentation Data' not IRIX 'z'.
Packit cdaae3
    See The Linux Standard Base Core Specification version 3.0
Packit cdaae3
*/
Packit cdaae3
Packit cdaae3
#define DW_DEBUG_FRAME_VERSION     1 /* DWARF2 */
Packit cdaae3
#define DW_DEBUG_FRAME_VERSION3    3 /* DWARF3 */
Packit cdaae3
#define DW_DEBUG_FRAME_VERSION4    4 /* DWARF4 */
Packit cdaae3
/*  The following is SGI/IRIX specific, and probably no longer
Packit cdaae3
    in use anywhere. */
Packit cdaae3
#define DW_DEBUG_FRAME_AUGMENTER_STRING     	"mti v1"
Packit cdaae3
Packit cdaae3
/* The value of the offset field for Cie's. */
Packit cdaae3
#define DW_CIE_OFFSET		~(0x0)
Packit cdaae3
Packit cdaae3
/* The augmentation string may be NULL.	*/
Packit cdaae3
#define DW_EMPTY_STRING		""
Packit cdaae3
Packit cdaae3
#define DW_FRAME_INSTR_OPCODE_SHIFT		6
Packit cdaae3
#define DW_FRAME_INSTR_OFFSET_MASK		0x3f
Packit cdaae3
Packit cdaae3
/*
Packit cdaae3
    This struct denotes the rule for a register in a row of
Packit cdaae3
    the frame table.  In other words, it is one element of
Packit cdaae3
    the table.
Packit cdaae3
*/
Packit cdaae3
struct Dwarf_Reg_Rule_s {
Packit cdaae3
Packit cdaae3
    /*  Is a flag indicating whether the rule includes the offset
Packit cdaae3
        field, ie whether the ru_offset field is valid or not.
Packit cdaae3
        Applies only if DW_EXPR_OFFSET or DW_EXPR_VAL_OFFSET.
Packit cdaae3
        It is important, since reg+offset (offset of 0) is different from
Packit cdaae3
        just 'register' since the former means 'read memory at address
Packit cdaae3
        given by the sum of register contents plus offset to get the
Packit cdaae3
        value'. whereas the latter means 'the value is in the register'.
Packit cdaae3
Packit cdaae3
        The 'register' numbers are either real registers (ie, table
Packit cdaae3
        columns defined as real registers) or defined entries that are
Packit cdaae3
        not really hardware registers, such as DW_FRAME_SAME_VAL or
Packit cdaae3
        DW_FRAME_CFA_COL.  */
Packit cdaae3
    Dwarf_Sbyte ru_is_off;
Packit cdaae3
Packit cdaae3
    /*  DW_EXPR_OFFSET (0, DWARF2)
Packit cdaae3
        DW_EXPR_VAL_OFFSET 1 (dwarf2/3)
Packit cdaae3
        DW_EXPR_EXPRESSION 2  (dwarf2/3)
Packit cdaae3
        DW_EXPR_VAL_EXPRESSION 3 (dwarf2/3)
Packit cdaae3
        See dwarf_frame.h. */
Packit cdaae3
    Dwarf_Sbyte ru_value_type;
Packit cdaae3
Packit cdaae3
    /* Register involved in this rule. */
Packit cdaae3
    Dwarf_Half ru_register;
Packit cdaae3
Packit cdaae3
    /*  Offset to add to register, if indicated by ru_is_offset
Packit cdaae3
        and if DW_EXPR_OFFSET or DW_EXPR_VAL_OFFSET.
Packit cdaae3
        If DW_EXPR_EXPRESSION or DW_EXPR_VAL_EXPRESSION
Packit cdaae3
        this is DW_FORM_block block-length, not offset. */
Packit cdaae3
    Dwarf_Unsigned ru_offset_or_block_len;
Packit cdaae3
Packit cdaae3
    /*  For DW_EXPR_EXPRESSION DW_EXPR_VAL_EXPRESSION these is set,
Packit cdaae3
        else 0. */
Packit cdaae3
    Dwarf_Small *ru_block;
Packit cdaae3
};
Packit cdaae3
Packit cdaae3
typedef struct Dwarf_Frame_s *Dwarf_Frame;
Packit cdaae3
Packit cdaae3
/*
Packit cdaae3
    This structure represents a row of the frame table.
Packit cdaae3
    Fr_loc is the pc value for this row, and Fr_reg
Packit cdaae3
    contains the rule for each column.
Packit cdaae3
Packit cdaae3
    Entry DW_FRAME_CFA_COL of fr_reg was the tradional MIPS
Packit cdaae3
    way of setting CFA.  cfa_rule is the new one.
Packit cdaae3
*/
Packit cdaae3
struct Dwarf_Frame_s {
Packit cdaae3
Packit cdaae3
    /* Pc value corresponding to this row of the frame table. */
Packit cdaae3
    Dwarf_Addr fr_loc;
Packit cdaae3
Packit cdaae3
    /* Rules for all the registers in this row. */
Packit cdaae3
    struct Dwarf_Reg_Rule_s fr_cfa_rule;
Packit cdaae3
Packit cdaae3
    /*  fr_reg_count is the the number of
Packit cdaae3
        entries of the fr_reg array. */
Packit cdaae3
    unsigned long            fr_reg_count;
Packit cdaae3
    struct Dwarf_Reg_Rule_s *fr_reg;
Packit cdaae3
Packit cdaae3
    Dwarf_Frame fr_next;
Packit cdaae3
};
Packit cdaae3
Packit cdaae3
typedef struct Dwarf_Frame_Op_List_s *Dwarf_Frame_Op_List;
Packit cdaae3
Packit cdaae3
/* This is used to chain together Dwarf_Frame_Op structures. */
Packit cdaae3
struct Dwarf_Frame_Op_List_s {
Packit cdaae3
    Dwarf_Frame_Op *fl_frame_instr;
Packit cdaae3
    Dwarf_Frame_Op_List fl_next;
Packit cdaae3
};
Packit cdaae3
Packit cdaae3
/* See dwarf_frame.c for the heuristics used to set the
Packit cdaae3
   Dwarf_Cie ci_augmentation_type.
Packit cdaae3
Packit cdaae3
   This succinctly helps interpret the size and meaning of .debug_frame
Packit cdaae3
   and (for gcc) .eh_frame.
Packit cdaae3
Packit cdaae3
   In the case of gcc .eh_frame (gcc 3.3, 3.4)
Packit cdaae3
   z may be followed by one or more of
Packit cdaae3
   L R P.
Packit cdaae3
Packit cdaae3
*/
Packit cdaae3
enum Dwarf_augmentation_type {
Packit cdaae3
    aug_empty_string, /* Default empty augmentation string.  */
Packit cdaae3
    aug_irix_exception_table,  /* IRIX  plain  "z",
Packit cdaae3
        for exception handling, IRIX CC compiler.
Packit cdaae3
        Proposed z1 z2 ... never implemented.  */
Packit cdaae3
    aug_gcc_eh_z,       /* gcc z augmentation,  (including
Packit cdaae3
        L R P variations). gcc 3.3 3.4 exception
Packit cdaae3
        handling in eh_frame.  */
Packit cdaae3
    aug_irix_mti_v1,  /* IRIX "mti v1" augmentation string. Probably
Packit cdaae3
        never in any released SGI-IRIX compiler. */
Packit cdaae3
    aug_eh,           /* For gcc .eh_frame, "eh" is the string.,
Packit cdaae3
        gcc 1,2, egcs. Older values.  */
Packit cdaae3
    aug_armcc,  /* "armcc+" meaning the  cfa calculation
Packit cdaae3
        is corrected to be standard (output by
Packit cdaae3
        Arm C RVCT 3.0 SP1 and later). See
Packit cdaae3
        http://sourceware.org/ml/gdb-patches/2006-12/msg00249.html
Packit cdaae3
        for details. */
Packit cdaae3
    aug_unknown,      /* Unknown augmentation, we cannot do much. */
Packit cdaae3
Packit cdaae3
    /*  HC, From http://sourceforge.net/p/elftoolchain/tickets/397/ */
Packit cdaae3
    aug_metaware,
Packit cdaae3
Packit cdaae3
    aug_past_last
Packit cdaae3
};
Packit cdaae3
Packit cdaae3
Packit cdaae3
/*
Packit cdaae3
    This structure contains all the pertinent info for a Cie. Most
Packit cdaae3
    of the fields are taken straight from the definition of a Cie.
Packit cdaae3
    Ci_cie_start points to the address (in .debug_frame) where this
Packit cdaae3
    Cie begins.  Ci_cie_instr_start points to the first byte of the
Packit cdaae3
    frame instructions for this Cie.  Ci_dbg points to the associated
Packit cdaae3
    Dwarf_Debug structure.  Ci_initial_table is a pointer to the table
Packit cdaae3
    row generated by the instructions for this Cie.
Packit cdaae3
*/
Packit cdaae3
struct Dwarf_Cie_s {
Packit cdaae3
    Dwarf_Unsigned ci_length;
Packit cdaae3
    char *ci_augmentation;
Packit cdaae3
    Dwarf_Small ci_code_alignment_factor;
Packit cdaae3
    Dwarf_Sbyte ci_data_alignment_factor;
Packit cdaae3
    Dwarf_Small ci_return_address_register;
Packit cdaae3
    Dwarf_Small *ci_cie_start;
Packit cdaae3
    Dwarf_Small *ci_cie_instr_start;
Packit cdaae3
    Dwarf_Small *ci_cie_end;
Packit cdaae3
    Dwarf_Debug ci_dbg;
Packit cdaae3
    Dwarf_Frame ci_initial_table;
Packit cdaae3
    Dwarf_Cie ci_next;
Packit cdaae3
    Dwarf_Small ci_length_size;
Packit cdaae3
    Dwarf_Small ci_extension_size;
Packit cdaae3
    Dwarf_Half ci_cie_version_number;
Packit cdaae3
    enum Dwarf_augmentation_type ci_augmentation_type;
Packit cdaae3
Packit cdaae3
    /*  The following 2 for GNU .eh_frame exception handling
Packit cdaae3
        Augmentation Data. Set if ci_augmentation_type
Packit cdaae3
        is aug_gcc_eh_z. Zero if unused. */
Packit cdaae3
    Dwarf_Unsigned ci_gnu_eh_augmentation_len;
Packit cdaae3
    Dwarf_Ptr      ci_gnu_eh_augmentation_bytes;
Packit cdaae3
Packit cdaae3
    /*  These are extracted from the gnu eh_frame
Packit cdaae3
        augmentation if the
Packit cdaae3
        augmentation begins with 'z'. See Linux LSB documents.
Packit cdaae3
        Otherwize these are zero. */
Packit cdaae3
    unsigned char    ci_gnu_personality_handler_encoding;
Packit cdaae3
    unsigned char    ci_gnu_lsda_encoding;
Packit cdaae3
    unsigned char    ci_gnu_fde_begin_encoding;
Packit cdaae3
Packit cdaae3
    /*  If 'P' augmentation present, is handler addr. Else
Packit cdaae3
        is zero. */
Packit cdaae3
    Dwarf_Addr     ci_gnu_personality_handler_addr;
Packit cdaae3
Packit cdaae3
Packit cdaae3
    /*  In creating list of cie's (which will become an array)
Packit cdaae3
        record the position so fde can get it on fde creation. */
Packit cdaae3
    Dwarf_Unsigned ci_index;
Packit cdaae3
    Dwarf_Small *  ci_section_ptr;
Packit cdaae3
    Dwarf_Unsigned ci_section_length;
Packit cdaae3
    Dwarf_Small *  ci_section_end;
Packit cdaae3
    /*  DWARF4 adds address size and segment size to the CIE: the .debug_info
Packit cdaae3
        section may not always be present to allow libdwarf to
Packit cdaae3
        find address_size from the compilation-unit. */
Packit cdaae3
    Dwarf_Half   ci_address_size;
Packit cdaae3
    Dwarf_Half   ci_segment_size;
Packit cdaae3
Packit cdaae3
};
Packit cdaae3
Packit cdaae3
/*
Packit cdaae3
    This structure contains all the pertinent info for a Fde.
Packit cdaae3
    Most of the fields are taken straight from the definition.
Packit cdaae3
    fd_cie_index is the index of the Cie associated with this
Packit cdaae3
    Fde in the list of Cie's for this debug_frame.  Fd_cie
Packit cdaae3
    points to the corresponsing Dwarf_Cie structure.  Fd_fde_start
Packit cdaae3
    points to the start address of the Fde.  Fd_fde_instr_start
Packit cdaae3
    points to the start of the instructions for this Fde.  Fd_dbg
Packit cdaae3
    points to the associated Dwarf_Debug structure.
Packit cdaae3
*/
Packit cdaae3
struct Dwarf_Fde_s {
Packit cdaae3
    Dwarf_Unsigned fd_length;
Packit cdaae3
    Dwarf_Addr fd_cie_offset;
Packit cdaae3
    Dwarf_Unsigned fd_cie_index;
Packit cdaae3
    Dwarf_Cie fd_cie;
Packit cdaae3
    Dwarf_Addr fd_initial_location;
Packit cdaae3
    Dwarf_Small *fd_initial_loc_pos;
Packit cdaae3
    Dwarf_Addr fd_address_range;
Packit cdaae3
    Dwarf_Small *fd_fde_start;
Packit cdaae3
    Dwarf_Small *fd_fde_instr_start;
Packit cdaae3
    Dwarf_Small *fd_fde_end;
Packit cdaae3
    Dwarf_Debug fd_dbg;
Packit cdaae3
Packit cdaae3
    /*  fd_offset_into_exception_tables is SGI/IRIX exception table
Packit cdaae3
        offset. Unused and zero if not IRIX .debug_frame. */
Packit cdaae3
    Dwarf_Signed fd_offset_into_exception_tables;
Packit cdaae3
Packit cdaae3
    Dwarf_Fde fd_next;
Packit cdaae3
    Dwarf_Small fd_length_size;
Packit cdaae3
    Dwarf_Small fd_extension_size;
Packit cdaae3
    /*  So we know from an fde which 'count' of fde-s in
Packit cdaae3
        Dwarf_Debug applies:  eh or standard. */
Packit cdaae3
    Dwarf_Small fd_is_eh;
Packit cdaae3
    /*  The following 2 for GNU .eh_frame exception handling
Packit cdaae3
        Augmentation Data. Set if CIE ci_augmentation_type
Packit cdaae3
        is aug_gcc_eh_z. Zero if unused. */
Packit cdaae3
    Dwarf_Unsigned fd_gnu_eh_augmentation_len;
Packit cdaae3
    Dwarf_Bool fd_gnu_eh_aug_present;
Packit cdaae3
    Dwarf_Ptr fd_gnu_eh_augmentation_bytes;
Packit cdaae3
    Dwarf_Addr fd_gnu_eh_lsda; /* If 'L' augmentation letter
Packit cdaae3
        present:  is address of the
Packit cdaae3
        Language Specific Data Area (LSDA). If not 'L" is zero. */
Packit cdaae3
Packit cdaae3
Packit cdaae3
    /* The following 3 are about the Elf section the FDEs come from. */
Packit cdaae3
    Dwarf_Small * fd_section_ptr;
Packit cdaae3
    Dwarf_Unsigned fd_section_length;
Packit cdaae3
    Dwarf_Unsigned fd_section_index;
Packit cdaae3
    Dwarf_Small * fd_section_end;
Packit cdaae3
Packit cdaae3
    /*  If fd_eh_table_value_set is true, then fd_eh_table_value is
Packit cdaae3
        meaningful.  Never meaningful for .debug_frame, is
Packit cdaae3
        part of .eh_frame. */
Packit cdaae3
    Dwarf_Unsigned fd_eh_table_value;
Packit cdaae3
    Dwarf_Bool fd_eh_table_value_set;
Packit cdaae3
Packit cdaae3
    /* The following are memoization to save recalculation. */
Packit cdaae3
    struct Dwarf_Frame_s fd_fde_table;
Packit cdaae3
    Dwarf_Addr    fd_fde_pc_requested;
Packit cdaae3
    Dwarf_Bool    fd_have_fde_tab;
Packit cdaae3
Packit cdaae3
};
Packit cdaae3
Packit cdaae3
Packit cdaae3
int
Packit cdaae3
_dwarf_frame_address_offsets(Dwarf_Debug dbg, Dwarf_Addr ** addrlist,
Packit cdaae3
    Dwarf_Off ** offsetlist,
Packit cdaae3
    Dwarf_Signed * returncount,
Packit cdaae3
    Dwarf_Error * err);
Packit cdaae3
Packit cdaae3
int
Packit cdaae3
_dwarf_get_fde_list_internal(Dwarf_Debug dbg,
Packit cdaae3
    Dwarf_Cie ** cie_data,
Packit cdaae3
    Dwarf_Signed * cie_element_count,
Packit cdaae3
    Dwarf_Fde ** fde_data,
Packit cdaae3
    Dwarf_Signed * fde_element_count,
Packit cdaae3
    Dwarf_Small * section_ptr,
Packit cdaae3
    Dwarf_Unsigned section_index,
Packit cdaae3
    Dwarf_Unsigned section_length,
Packit cdaae3
    Dwarf_Unsigned cie_id_value,
Packit cdaae3
    int use_gnu_cie_calc,  /* If non-zero,
Packit cdaae3
    this is gcc eh_frame. */
Packit cdaae3
    Dwarf_Error * error);
Packit cdaae3
Packit cdaae3
enum Dwarf_augmentation_type
Packit cdaae3
_dwarf_get_augmentation_type(Dwarf_Debug dbg,
Packit cdaae3
    Dwarf_Small *augmentation_string,
Packit cdaae3
    int is_gcc_eh_frame);
Packit cdaae3
Packit cdaae3
int _dwarf_get_return_address_reg(Dwarf_Small *frame_ptr,
Packit cdaae3
    int version,
Packit cdaae3
    Dwarf_Debug dbg,
Packit cdaae3
    Dwarf_Byte_Ptr section_end,
Packit cdaae3
    unsigned long *size,
Packit cdaae3
    Dwarf_Unsigned *return_address_register,
Packit cdaae3
    Dwarf_Error *error);
Packit cdaae3
Packit cdaae3
Packit cdaae3
/*  Temporary recording of crucial cie/fde prefix data.
Packit cdaae3
    Vastly simplifies some argument lists.  */
Packit cdaae3
struct cie_fde_prefix_s {
Packit cdaae3
    /*  cf_start_addr is a pointer to the first byte
Packit cdaae3
        of this fde/cie (meaning the length field itself) */
Packit cdaae3
    Dwarf_Small *  cf_start_addr;
Packit cdaae3
    /*  cf_addr_after_prefix is a pointer
Packit cdaae3
        to the first byte of this fde/cie
Packit cdaae3
        we are reading now, immediately following
Packit cdaae3
        the length field read by READ_AREA_LENGTH. */
Packit cdaae3
    Dwarf_Small *  cf_addr_after_prefix;
Packit cdaae3
    /*  cf_length is the length field value from the cie/fde
Packit cdaae3
        header.   */
Packit cdaae3
    Dwarf_Unsigned cf_length;
Packit cdaae3
    int            cf_local_length_size;
Packit cdaae3
    int            cf_local_extension_size;
Packit cdaae3
    Dwarf_Unsigned cf_cie_id;
Packit cdaae3
    Dwarf_Small *  cf_cie_id_addr; /* used for eh_frame calculations. */
Packit cdaae3
Packit cdaae3
    /*  Simplifies passing around these values to create fde having
Packit cdaae3
        these here. */
Packit cdaae3
    /*  cf_section_ptr is a pointer to the first byte
Packit cdaae3
        of the object section the prefix is read from.  */
Packit cdaae3
    Dwarf_Small *  cf_section_ptr;
Packit cdaae3
    Dwarf_Unsigned cf_section_index;
Packit cdaae3
    Dwarf_Unsigned cf_section_length;
Packit cdaae3
};
Packit cdaae3
Packit cdaae3
int
Packit cdaae3
_dwarf_exec_frame_instr(Dwarf_Bool make_instr,
Packit cdaae3
    Dwarf_Frame_Op ** ret_frame_instr,
Packit cdaae3
    Dwarf_Bool search_pc,
Packit cdaae3
    Dwarf_Addr search_pc_val,
Packit cdaae3
    Dwarf_Addr initial_loc,
Packit cdaae3
    Dwarf_Small * start_instr_ptr,
Packit cdaae3
    Dwarf_Small * final_instr_ptr,
Packit cdaae3
    Dwarf_Frame table,
Packit cdaae3
    Dwarf_Cie cie,
Packit cdaae3
    Dwarf_Debug dbg,
Packit cdaae3
    Dwarf_Half reg_num_of_cfa,
Packit cdaae3
    Dwarf_Sword * returned_count,
Packit cdaae3
    Dwarf_Bool  * has_more_rows,
Packit cdaae3
    Dwarf_Addr  * subsequent_pc,
Packit cdaae3
    Dwarf_Error * error);
Packit cdaae3
Packit cdaae3
Packit cdaae3
int dwarf_read_cie_fde_prefix(Dwarf_Debug dbg,
Packit cdaae3
    Dwarf_Small *frame_ptr_in,
Packit cdaae3
    Dwarf_Small *section_ptr_in,
Packit cdaae3
    Dwarf_Unsigned section_index_in,
Packit cdaae3
    Dwarf_Unsigned section_length_in,
Packit cdaae3
    struct cie_fde_prefix_s *prefix_out,
Packit cdaae3
    Dwarf_Error *error);
Packit cdaae3
Packit cdaae3
int dwarf_create_fde_from_after_start(Dwarf_Debug dbg,
Packit cdaae3
    struct cie_fde_prefix_s *  prefix,
Packit cdaae3
    Dwarf_Small *section_pointer,
Packit cdaae3
    Dwarf_Small *frame_ptr,
Packit cdaae3
    Dwarf_Small *section_ptr_end,
Packit cdaae3
    int use_gnu_cie_calc,
Packit cdaae3
    Dwarf_Cie  cie_ptr_in,
Packit cdaae3
    Dwarf_Fde *fde_ptr_out,
Packit cdaae3
    Dwarf_Error *error);
Packit cdaae3
Packit cdaae3
int dwarf_create_cie_from_after_start(Dwarf_Debug dbg,
Packit cdaae3
    struct cie_fde_prefix_s *prefix,
Packit cdaae3
    Dwarf_Small* section_pointer,
Packit cdaae3
    Dwarf_Small* frame_ptr,
Packit cdaae3
    Dwarf_Small *section_ptr_end,
Packit cdaae3
    Dwarf_Unsigned cie_count,
Packit cdaae3
    int use_gnu_cie_calc,
Packit cdaae3
    Dwarf_Cie *cie_ptr_out,
Packit cdaae3
        Dwarf_Error *error);
Packit cdaae3
Packit cdaae3
Packit cdaae3
int _dwarf_frame_constructor(Dwarf_Debug dbg,void * );
Packit cdaae3
void _dwarf_frame_destructor (void *);
Packit cdaae3
void _dwarf_fde_destructor (void *);