libdwarf
Data Structures | Typedefs
Defined and Opaque Structs Group

Data Structures

struct  Dwarf_Form_Data16_s
 
struct  Dwarf_Sig8_s
 
struct  Dwarf_Block_s
 
struct  Dwarf_Printf_Callback_Info_s
 
struct  Dwarf_Cmdline_Options_s
 
struct  Dwarf_Ranges_s
 
struct  Dwarf_Regtable_Entry3_s
 
struct  Dwarf_Regtable3_s
 
struct  Dwarf_Macro_Details_s
 
struct  Dwarf_Obj_Access_Section_a_s
 
struct  Dwarf_Obj_Access_Methods_a_s
 
struct  Dwarf_Obj_Access_Interface_a_s
 
struct  Dwarf_Debug_Fission_Per_CU_s
 

Typedefs

typedef struct Dwarf_Form_Data16_s Dwarf_Form_Data16
 
typedef struct Dwarf_Sig8_s Dwarf_Sig8
 
typedef struct Dwarf_Block_s Dwarf_Block
 
typedef struct Dwarf_Locdesc_c_s * Dwarf_Locdesc_c
 
typedef struct Dwarf_Loc_Head_c_s * Dwarf_Loc_Head_c
 
typedef struct Dwarf_Gnu_Index_Head_s * Dwarf_Gnu_Index_Head
 
typedef struct Dwarf_Dsc_Head_s * Dwarf_Dsc_Head
 
typedef struct Dwarf_Frame_Instr_Head_s * Dwarf_Frame_Instr_Head
 
typedef void(* dwarf_printf_callback_function_type) (void *, const char *)
 
typedef struct Dwarf_Cmdline_Options_s Dwarf_Cmdline_Options
 
typedef struct Dwarf_Str_Offsets_Table_s * Dwarf_Str_Offsets_Table
 
typedef struct Dwarf_Ranges_s Dwarf_Ranges
 
typedef struct Dwarf_Regtable_Entry3_s Dwarf_Regtable_Entry3
 
typedef struct Dwarf_Regtable3_s Dwarf_Regtable3
 
typedef struct Dwarf_Error_s * Dwarf_Error
 
typedef struct Dwarf_Debug_s * Dwarf_Debug
 
typedef struct Dwarf_Die_s * Dwarf_Die
 
typedef struct Dwarf_Line_s * Dwarf_Line
 
typedef struct Dwarf_Global_s * Dwarf_Global
 
typedef struct Dwarf_Type_s * Dwarf_Type
 
typedef struct Dwarf_Func_s * Dwarf_Func
 
typedef struct Dwarf_Var_s * Dwarf_Var
 
typedef struct Dwarf_Weak_s * Dwarf_Weak
 
typedef struct Dwarf_Attribute_s * Dwarf_Attribute
 
typedef struct Dwarf_Abbrev_s * Dwarf_Abbrev
 
typedef struct Dwarf_Fde_s * Dwarf_Fde
 
typedef struct Dwarf_Cie_s * Dwarf_Cie
 
typedef struct Dwarf_Arange_s * Dwarf_Arange
 
typedef struct Dwarf_Gdbindex_s * Dwarf_Gdbindex
 
typedef struct Dwarf_Xu_Index_Header_s * Dwarf_Xu_Index_Header
 
typedef struct Dwarf_Line_Context_s * Dwarf_Line_Context
 
typedef struct Dwarf_Macro_Context_s * Dwarf_Macro_Context
 
typedef struct Dwarf_Dnames_Head_s * Dwarf_Dnames_Head
 
typedef void(* Dwarf_Handler) (Dwarf_Error dw_error, Dwarf_Ptr dw_errarg)
 
typedef struct Dwarf_Rnglists_Head_s * Dwarf_Rnglists_Head
 
typedef struct Dwarf_Macro_Details_s Dwarf_Macro_Details
 
typedef struct Dwarf_Debug_Fission_Per_CU_s Dwarf_Debug_Fission_Per_CU
 
typedef struct Dwarf_Obj_Access_Interface_a_s Dwarf_Obj_Access_Interface_a
 
typedef struct Dwarf_Obj_Access_Methods_a_s Dwarf_Obj_Access_Methods_a
 
typedef struct Dwarf_Obj_Access_Section_a_s Dwarf_Obj_Access_Section_a
 

Detailed Description

Typedef Documentation

◆ Dwarf_Form_Data16

a container for a DW_FORM_data16 data item. We have no integer types suitable so this special struct is used instead. It is up to consumers/producers to deal with the contents.

◆ Dwarf_Sig8

Used for signatures where ever they appear. It is not a string, it is 8 bytes of a signature one would use to find a type unit.

See also
dwarf_formsig8

◆ Dwarf_Block

Used to hold uninterpreted blocks of data. bl_data refers to on an uninterpreted block of data Used with certain location information functions, a frame expression function, expanded frame instructions, and DW_FORM_block functions.

See also
dwarf_formblock
Documenting Form_Block

◆ Dwarf_Locdesc_c

Provides access to Dwarf_Locdesc_c, a single location description

◆ Dwarf_Loc_Head_c

provides access to any sort of location description for DWARF2,3,4, or 5.

◆ Dwarf_Dsc_Head

Access to DW_AT_discr_list array of discriminant values.

◆ Dwarf_Frame_Instr_Head

The basis for access to DWARF frame instructions (FDE or CIE) in full detail.

◆ dwarf_printf_callback_function_type

dwarf_printf_callback_function_type

Used as a function pointer to a user-written callback function.

◆ Dwarf_Cmdline_Options

check_verbose_mode defaults to FALSE. If a libdwarf-calling program sets this TRUE it means some errors in Line Table headers get a much more detailed description of the error which is reported the caller via printf_callback() function (the caller can do something with the message). Or the libdwarf calling code can call dwarf_record_cmdline_options() to set the new value.

◆ Dwarf_Str_Offsets_Table

Provides an access to the .debug_str_offsets section independently of other DWARF sections. Mainly of use in examining the .debug_str_offsets section content for problems.

◆ Dwarf_Ranges

Details of of non-contiguous address ranges of DIEs for DWARF2, DWARF3, and DWARF4. Sufficient for older dwarf.

◆ Dwarf_Regtable_Entry3

For each index i (naming a hardware register with dwarf number i) the following is true and defines the value of that register:

If dw_regnum is Register DW_FRAME_UNDEFINED_VAL
    it is not DWARF register number but
    a place holder indicating the register
    has no defined value.
If dw_regnum is Register DW_FRAME_SAME_VAL
    it  is not DWARF register number but
    a place holder indicating the register has the same
    value in the previous frame.

    DW_FRAME_UNDEFINED_VAL, DW_FRAME_SAME_VAL and
    DW_FRAME_CFA_COL are only present at libdwarf runtime.
    Never on disk.
    DW_FRAME_* Values present on disk are in dwarf.h
    Because DW_FRAME_SAME_VAL and DW_FRAME_UNDEFINED_VAL
    and DW_FRAME_CFA_COL are definable at runtime
    consider the names symbolic in this comment,
    not absolute.

Otherwise: the register number is a DWARF register number
    (see ABI documents for how this translates to hardware/
    software register numbers in the machine hardware)
    and the following applies:

In a cfa-defining entry (rt3_cfa_rule) the regnum is the
CFA 'register number'. Which is some 'normal' register,
not DW_FRAME_CFA_COL, nor DW_FRAME_SAME_VAL, nor
DW_FRAME_UNDEFINED_VAL.

If dw_value_type == DW_EXPR_OFFSET (the only
possible case for dwarf2):
    If dw_offset_relevant is non-zero, then
        the value is stored at at the address
        CFA+N where N is a signed offset.
        dw_regnum is the cfa register rule which means
        one ignores dw_regnum and uses the CFA appropriately.
        So dw_offset is a signed value, really,
        and must be printed/evaluated as such.
        Rule: Offset(N)
    If dw_offset_relevant is zero, then the
        value of the register
        is the value of (DWARF) register number dw_regnum.
        Rule: register(R)
If dw_value_type  == DW_EXPR_VAL_OFFSET
    the  value of this register is CFA +N where
    N is a signed offset.
    dw_regnum is the cfa register rule which means
    one ignores dw_regnum and uses the CFA appropriately.
    Rule: val_offset(N)
If dw_value_type  == DW_EXPR_EXPRESSION
    The value of the register is the value at the address
    computed by evaluating the DWARF expression E.
    Rule: expression(E)
    The expression E byte stream is pointed to by
    block.bl_data.
    The expression length in bytes is given by
    block.bl_len.
If dw_value_type  == DW_EXPR_VAL_EXPRESSION
    The value of the register is the value
    computed by evaluating the DWARF expression E.
    Rule: val_expression(E)
    The expression E byte stream is pointed to
    by block.bl_data.
    The expression length in bytes is given by
    block.bl_len.
Other values of dw_value_type are an error.

◆ Dwarf_Regtable3

This structs provides a way for applications to select the number of frame registers and to select names for them.

rt3_rules and rt3_reg_table_size must be filled in before calling libdwarf. Filled in with a pointer to an array (pointer and array set up by the calling application) of rt3_reg_table_size Dwarf_Regtable_Entry3_s structs. libdwarf does not allocate or deallocate space for the rules, you must do so. libdwarf will initialize the contents rules array, you do not need to do so (though if you choose to initialize the array somehow that is ok: libdwarf will overwrite your initializations with its own).

◆ Dwarf_Error

&error is used in most calls to return error details when the call returns DW_DLV_ERROR.

◆ Dwarf_Debug

An open Dwarf_Debug points to data that libdwarf maintains to support libdwarf calls.

◆ Dwarf_Die

Used to reference a DWARF Debugging Information Entry.

◆ Dwarf_Line

Used to reference a line reference from the .debug_line section.

◆ Dwarf_Global

Used to reference a reference to an entry in the .debug_pubnames section.

◆ Dwarf_Type

Used to reference a reference to an entry in the .debug_pubtypes section (as well as the SGI-only extension .debug_types).

◆ Dwarf_Attribute

Used to reference a Dwarf_Die attribute

◆ Dwarf_Abbrev

Used to reference a Dwarf_Abbrev, though usually such are handled transparently in the library

◆ Dwarf_Fde

Used to reference .debug_frame or .eh_frame FDE.

◆ Dwarf_Cie

Used to reference .debug_frame or .eh_frame CIE.

◆ Dwarf_Arange

Used to reference a code address range in a section such as .debug_info.

◆ Dwarf_Gdbindex

Used to reference .gdb_index section data which is a fast-access section by and for gdb.

◆ Dwarf_Xu_Index_Header

Used to reference .debug_cu_index or .debug_tu_index sections in a split-dwarf package file.

◆ Dwarf_Line_Context

Used as the general reference line data (.debug_line).

◆ Dwarf_Macro_Context

Used as the general reference to DWARF5 .debug_macro data.

◆ Dwarf_Dnames_Head

Used as the general reference to the DWARF5 .debug_names section.

◆ Dwarf_Handler

Dwarf_Handler

Used in rare cases (mainly tiny programs) with dwarf_init_path() etc initialization calls.

◆ Dwarf_Rnglists_Head

typedef struct Dwarf_Rnglists_Head_s * Dwarf_Rnglists_Head

Used for access to a set of DWARF5 debug_rnglists entries.

◆ Dwarf_Obj_Access_Interface_a

Used for access to and settint up special data allowing access to DWARF even with no object files present

◆ Dwarf_Obj_Access_Methods_a

Used for access to and settint up special data allowing access to DWARF even with no object files present

◆ Dwarf_Obj_Access_Section_a

Used for access to and settint up special data allowing access to DWARF even with no object files present