BCHDwarfTypes
type dwarf_tag_type_t =
| DW_TAG_array_type
| DW_TAG_class_type
| DW_TAG_entry_point
| DW_TAG_enumeration_type
| DW_TAG_formal_parameter
| DW_TAG_imported_declaration
| DW_TAG_label
| DW_TAG_lexical_block
| DW_TAG_member
| DW_TAG_pointer_type
| DW_TAG_reference_type
| DW_TAG_compile_unit
| DW_TAG_string_type
| DW_TAG_structure_type
| DW_TAG_subroutine_type
| DW_TAG_typedef
| DW_TAG_union_type
| DW_TAG_unspecified_parameters
| DW_TAG_variant
| DW_TAG_common_block
| DW_TAG_common_inclusion
| DW_TAG_inheritance
| DW_TAG_inlined_subroutine
| DW_TAG_module
| DW_TAG_ptr_to_member_type
| DW_TAG_set_type
| DW_TAG_subrange_type
| DW_TAG_with_stmt
| DW_TAG_access_declaration
| DW_TAG_base_type
| DW_TAG_catch_block
| DW_TAG_const_type
| DW_TAG_constant
| DW_TAG_enumerator
| DW_TAG_file_type
| DW_TAG_friend
| DW_TAG_namelist
| DW_TAG_namelist_item
| DW_TAG_packed_type
| DW_TAG_subprogram
| DW_TAG_template_type_parameter
| DW_TAG_template_value_parameter
| DW_TAG_thrown_type
| DW_TAG_try_block
| DW_TAG_variant_part
| DW_TAG_variable
| DW_TAG_volatile_type
| DW_TAG_dwarf_procedure
| DW_TAG_restrict_type
| DW_TAG_interface_type
| DW_TAG_namespace
| DW_TAG_imported_module
| DW_TAG_unspecified_type
| DW_TAG_partial_unit
| DW_TAG_imported_unit
| DW_TAG_condition
| DW_TAG_type_unit
| DW_TAG_rvalue_reference_type
| DW_TAG_template_alias
| DW_TAG_GNU_call_site
| DW_TAG_GNU_call_site_parameter
| DW_TAG_unknown of string
type dwarf_attr_type_t =
| DW_AT_sibling
| DW_AT_location
| DW_AT_name
| DW_AT_ordering
| DW_AT_byte_size
| DW_AT_bit_offset
| DW_AT_bit_size
| DW_AT_stmt_list
| DW_AT_low_pc
| DW_AT_high_pc
| DW_AT_language
| DW_AT_discr
| DW_AT_discr_value
| DW_AT_visibility
| DW_AT_import
| DW_AT_string_length
| DW_AT_common_reference
| DW_AT_comp_dir
| DW_AT_const_value
| DW_AT_containing_type
| DW_AT_default_value
| DW_AT_inline
| DW_AT_is_optional
| DW_AT_lower_bound
| DW_AT_producer
| DW_AT_prototyped
| DW_AT_return_addr
| DW_AT_start_scope
| DW_AT_bit_stride
| DW_AT_upper_bound
| DW_AT_abstract_origin
| DW_AT_accessibility
| DW_AT_address_class
| DW_AT_artificial
| DW_AT_base_types
| DW_AT_calling_convention
| DW_AT_count
| DW_AT_data_member_location
| DW_AT_decl_column
| DW_AT_decl_file
| DW_AT_decl_line
| DW_AT_declaration
| DW_AT_discr_list
| DW_AT_encoding
| DW_AT_external
| DW_AT_frame_base
| DW_AT_friend
| DW_AT_identifier_case
| DW_AT_macro_info
| DW_AT_namelist_item
| DW_AT_priority
| DW_AT_segment
| DW_AT_specification
| DW_AT_static_link
| DW_AT_type
| DW_AT_use_location
| DW_AT_variable_parameter
| DW_AT_virtuality
| DW_AT_vtable_elem_location
| DW_AT_allocated
| DW_AT_associated
| DW_AT_data_location
| DW_AT_byte_stride
| DW_AT_entry_pc
| DW_AT_use_UTF8
| DW_AT_extension
| DW_AT_ranges
| DW_AT_trampoline
| DW_AT_call_column
| DW_AT_call_file
| DW_AT_call_line
| DW_AT_description
| DW_AT_binary_scale
| DW_AT_decimal_scale
| DW_AT_small
| DW_AT_decimal_sign
| DW_AT_digit_count
| DW_AT_picture_string
| DW_AT_mutable
| DW_AT_linkage_name
| DW_AT_GNU_call_site_value
| DW_AT_GNU_call_site_target
| DW_AT_GNU_tail_call
| DW_AT_GNU_all_tail_call_sites
| DW_AT_GNU_all_call_sites
| DW_AT_GNU_macros
| DW_AT_unknown of string
type dwarf_form_type_t =
| DW_FORM_addr
| DW_FORM_block2
| DW_FORM_block4
| DW_FORM_data2
| DW_FORM_data4
| DW_FORM_data8
| DW_FORM_string
| DW_FORM_block
| DW_FORM_block1
| DW_FORM_data1
| DW_FORM_flag
| DW_FORM_sdata
| DW_FORM_strp
| DW_FORM_udata
| DW_FORM_ref_addr
| DW_FORM_ref1
| DW_FORM_ref2
| DW_FORM_ref4
| DW_FORM_ref8
| DW_FORM_ref_udata
| DW_FORM_indirect
| DW_FORM_sec_offset
| DW_FORM_exprloc
| DW_FORM_flag_present
| DW_FORM_ref_sig8
| DW_FORM_unknown of string
type dwarf_operand_t =
| ConstantAddress of BCHLibTypes.doubleword_int
| OneByteUnsignedValue of int
| OneByteSignedValue of int
| TwoByteUnsignedValue of int
| TwoByteSignedValue of int
| FourByteUnsignedValue of int
| EightByteUnsignedValue of CHNumerical.numerical_t
| ULEB128Constant of CHNumerical.numerical_t
| SLEB128Constant of CHNumerical.numerical_t
and dwarf_operation_t =
| DW_OP_addr of dwarf_operand_t
| DW_OP_deref
| DW_OP_const1u of dwarf_operand_t
| DW_OP_const1s of dwarf_operand_t
| DW_OP_const2u of dwarf_operand_t
| DW_OP_const4u of dwarf_operand_t
| DW_OP_dup
| DW_OP_drop
| DW_OP_over
| DW_OP_swap
| DW_OP_and
| DW_OP_minus
| DW_OP_mul
| DW_OP_or
| DW_OP_plus
| DW_OP_plus_uconst of dwarf_operand_t
| DW_OP_shl
| DW_OP_shr
| DW_OP_bra of dwarf_operand_t
| DW_OP_eq
| DW_OP_ge
| DW_OP_lt
| DW_OP_ne
| DW_OP_lit of int
| DW_OP_reg of int
| DW_OP_breg of int * dwarf_operand_t
| DW_OP_regx of dwarf_operand_t
| DW_OP_fbreg of dwarf_operand_t
| DW_OP_piece of dwarf_operand_t
| DW_OP_call_frame_cfa
| DW_OP_stack_value
| DW_OP_GNU_implicit_pointer of string * dwarf_operand_t * dwarf_operand_t
| DW_OP_GNU_entry_value of int * dwarf_expr_t
| DW_OP_GNU_regval_type of BCHLibTypes.doubleword_int
* dwarf_operand_t
* dwarf_operand_t
| DW_OP_GNU_convert of BCHLibTypes.doubleword_int * dwarf_operand_t
| DW_OP_GNU_parameter_ref of BCHLibTypes.doubleword_int * dwarf_operand_t
| DW_OP_unknown of int
and dwarf_expr_t = dwarf_operation_t list
type debug_abbrev_table_entry_t = {
dabb_index : int;
dabb_tag : dwarf_tag_type_t;
dabb_has_children : bool;
dabb_attr_specs : (dwarf_attr_type_t * dwarf_form_type_t) list;
}
type single_location_description_t =
| SimpleLocation of dwarf_expr_t
| CompositeLocation of (dwarf_expr_t * dwarf_operation_t) list
Describes the location of an object whose lifetime is either static or the same as the lexical block that owns it, and that does not move during its lifetime.
A simple location describes the location of one contiguous piece (or all) of an object. It may describe a location in addressable memory or a register, or the lack of a location.
A simple location can be (1) a Memory Location Description, expressed by a dwarf expression, whose value is the address of a piece or all of an entity in memory; (2) a Register Location Description, expressed by a single dwarf operation which can be either one of DW_OP_reg0, ..., DW_OP_reg31, or DW_OP_regx with an unsigned LEB128 that encodes the name of the register. (3) an Implicit Location Description, representing a piece or all of an object that has no actual location, but whose contents are either known or known to be undefined. A known constant or a computed value can be represented by:
A composite location describes the location of an object in terms of pieces, each of which may be contained in part of a register or stored in a memory location unrelated to other pieces.
A composite location consists of a sequence of pieces, where each piece consists of a simple location followed by a composition operator, which can be:
Ref: Dwarf v4, page 26-29
type location_list_entry_t = {
lle_start_address : BCHLibTypes.doubleword_int;
lle_end_address : BCHLibTypes.doubleword_int;
lle_location : single_location_description_t;
}
type debug_location_list_entry_t =
| LocationListEntry of location_list_entry_t
| LocBaseAddressSelectionEntry of BCHLibTypes.doubleword_int
| LocEndOfListEntry
type debug_loc_description_t =
| SingleLocation of single_location_description_t
| LocationList of debug_location_list_entry_t list
type debug_range_list_entry_t =
| RangeListEntry of BCHLibTypes.doubleword_int * BCHLibTypes.doubleword_int
| RngBaseAddressSelectionEntry of BCHLibTypes.doubleword_int
| RngEndOfListEntry
type debug_range_description_t =
| SingleAddress of BCHLibTypes.doubleword_int
| ContiguousAddressRange of BCHLibTypes.doubleword_int
* BCHLibTypes.doubleword_int
| NoncontiguousAddressRange of debug_range_list_entry_t list
type debug_aranges_table_entry_t = {
dar_length : int;
dar_debug_info_offset : BCHLibTypes.doubleword_int;
dar_pointer_size : int;
dar_tuples : (BCHLibTypes.doubleword_int * BCHLibTypes.doubleword_int) list;
}
type debug_info_entry_t = {
dwie_abbrev : int;
dwie_tag : dwarf_tag_type_t;
dwie_values : (dwarf_attr_type_t * dwarf_attr_value_t) list;
dwie_children : debug_info_entry_t list;
}
and dwarf_attr_value_t =
| DW_ATV_FORM_addr of BCHLibTypes.doubleword_int
| DW_ATV_FORM_block2 of int * int list
| DW_ATV_FORM_block4 of int * int list
| DW_ATV_FORM_data2 of int
| DW_ATV_FORM_data4 of BCHLibTypes.doubleword_int
| DW_ATV_FORM_data8 of BCHLibTypes.doubleword_int * BCHLibTypes.doubleword_int
| DW_ATV_FORM_string of string
| DW_ATV_FORM_block of int * int list
| DW_ATV_FORM_block1 of int * int list
| DW_ATV_FORM_data1 of int
| DW_ATV_FORM_flag of int
| DW_ATV_FORM_flag_present of int
| DW_ATV_FORM_sdata of int
| DW_ATV_FORM_strp of BCHLibTypes.doubleword_int * string
| DW_ATV_FORM_udata of int
| DW_ATV_FORM_ref_addr of int
| DW_ATV_FORM_ref1 of int
| DW_ATV_FORM_ref2 of int
| DW_ATV_FORM_ref4 of BCHLibTypes.doubleword_int
| DW_ATV_FORM_ref8 of int
| DW_ATV_FORM_ref_udata of int
| DW_ATV_FORM_exprloc of int * dwarf_expr_t
| DW_ATV_FORM_sec_offset of secoffset_kind_t * BCHLibTypes.doubleword_int
| DW_ATV_FORM_sec_offset_loclist of BCHLibTypes.doubleword_int
* debug_loc_description_t
| DW_ATV_FORM_sec_offset_rangelist of BCHLibTypes.doubleword_int
* debug_range_description_t
| DW_ATV_FORM_unknown of string
type debug_compilation_unit_header_t = {
dwcu_length : BCHLibTypes.doubleword_int;
dwcu_offset : BCHLibTypes.doubleword_int;
dwcu_version : int;
dwcu_abbrev_offset : BCHLibTypes.doubleword_int;
dwcu_address_size : int;
}
type debug_compilation_unit_t = {
cu_header : debug_compilation_unit_header_t;
cu_unit : debug_info_entry_t;
}