GCC Middle and Back End API Reference
dwarf2out.h File Reference

Go to the source code of this file.

Data Structures

union  dw_cfi_oprnd_struct
struct  dw_cfi_struct
struct  dw_fde_struct
struct  cfa_loc
struct  dw_vec_struct
struct  dw_val_struct
union  dw_val_struct::dw_val_struct_union
struct  dw_val_struct::dw_val_struct_union::dw_val_die_union
struct  dw_val_struct::dw_val_struct_union::dw_val_vms_delta_union
struct  dw_loc_descr_struct
struct  array_descr_info
struct  array_descr_info::array_descr_dimen

Typedefs

typedef struct die_structdw_die_ref
typedef struct die_structconst_dw_die_ref
typedef struct dw_val_structdw_val_ref
typedef struct dw_cfi_structdw_cfi_ref
typedef struct
dw_loc_descr_struct
dw_loc_descr_ref
typedef struct dw_loc_list_structdw_loc_list_ref
typedef union dw_cfi_oprnd_struct dw_cfi_oprnd
typedef struct dw_cfi_struct dw_cfi_node
typedef vec< dw_cfi_ref, va_gc > * cfi_vec
typedef struct dw_fde_structdw_fde_ref
typedef struct dw_fde_struct dw_fde_node
typedef struct cfa_loc dw_cfa_location
typedef struct dw_vec_struct dw_vec_const
typedef struct dw_val_struct dw_val_node
typedef struct dw_loc_descr_struct dw_loc_descr_node

Enumerations

enum  dw_cfi_oprnd_type {
  dw_cfi_oprnd_unused, dw_cfi_oprnd_reg_num, dw_cfi_oprnd_offset, dw_cfi_oprnd_addr,
  dw_cfi_oprnd_loc
}
enum  dw_val_class {
  dw_val_class_none, dw_val_class_addr, dw_val_class_offset, dw_val_class_loc,
  dw_val_class_loc_list, dw_val_class_range_list, dw_val_class_const, dw_val_class_unsigned_const,
  dw_val_class_const_double, dw_val_class_vec, dw_val_class_flag, dw_val_class_die_ref,
  dw_val_class_fde_ref, dw_val_class_lbl_id, dw_val_class_lineptr, dw_val_class_str,
  dw_val_class_macptr, dw_val_class_file, dw_val_class_data8, dw_val_class_decl_ref,
  dw_val_class_vms_delta, dw_val_class_high_pc
}

Functions

struct dw_loc_descr_structbuild_cfa_loc (dw_cfa_location *, HOST_WIDE_INT)
struct dw_loc_descr_structbuild_cfa_aligned_loc (dw_cfa_location *, HOST_WIDE_INT offset, HOST_WIDE_INT alignment)
struct dw_loc_descr_structmem_loc_descriptor (rtx, enum machine_mode mode, enum machine_mode mem_mode, enum var_init_status)
bool loc_descr_equal_p (dw_loc_descr_ref, dw_loc_descr_ref)
dw_fde_ref dwarf2out_alloc_current_fde (void)
unsigned long size_of_locs (dw_loc_descr_ref)
void output_loc_sequence (dw_loc_descr_ref, int)
void output_loc_sequence_raw (dw_loc_descr_ref)
void lookup_cfa_1 (dw_cfi_ref cfi, dw_cfa_location *loc, dw_cfa_location *remember)
bool cfa_equal_p (const dw_cfa_location *, const dw_cfa_location *)
void output_cfi (dw_cfi_ref, dw_fde_ref, int)
enum dw_cfi_oprnd_type dw_cfi_oprnd1_desc (enum dwarf_call_frame_info cfi)
enum dw_cfi_oprnd_type dw_cfi_oprnd2_desc (enum dwarf_call_frame_info cfi)
void output_cfi_directive (FILE *f, struct dw_cfi_struct *cfi)
void dwarf2out_decl (tree)
void dwarf2out_emit_cfi (dw_cfi_ref cfi)
void debug_dwarf (void)
void debug_dwarf_die (struct die_struct *)
void debug (die_struct &ref)
void debug (die_struct *ptr)
void dwarf2out_set_demangle_name_func (const char *(*)(const char *))

Variables

cfi_vec cie_cfi_vec

Typedef Documentation

typedef struct die_struct* const_dw_die_ref
typedef struct cfa_loc dw_cfa_location
This is how we define the location of the CFA. We use to handle it
   as REG + OFFSET all the time,  but now it can be more complex.
   It can now be either REG + CFA_OFFSET or *(REG + BASE_OFFSET) + CFA_OFFSET.
   Instead of passing around REG and OFFSET, we pass a copy
   of this structure.   
typedef struct dw_cfi_struct dw_cfi_node
typedef struct dw_cfi_struct* dw_cfi_ref
typedef struct die_struct* dw_die_ref
typedef struct dw_fde_struct dw_fde_node
All call frame descriptions (FDE's) in the GCC generated DWARF
   refer to a single Common Information Entry (CIE), defined at
   the beginning of the .debug_frame section.  This use of a single
   CIE obviates the need to keep track of multiple CIE's
   in the DWARF generation routines below.   
typedef struct dw_fde_struct* dw_fde_ref
Locations in memory are described using a sequence of stack machine
   operations.   
typedef struct dw_val_struct dw_val_node
The dw_val_node describes an attribute's value, as it is
   represented internally.   
typedef struct dw_val_struct* dw_val_ref
typedef struct dw_vec_struct dw_vec_const
Describe a floating point constant value, or a vector constant value.   

Enumeration Type Documentation

Call frames are described using a sequence of Call Frame
   Information instructions.  The register number, offset
   and address fields are provided as possible operands;
   their use is selected by the opcode field.   
Enumerator:
dw_cfi_oprnd_unused 
dw_cfi_oprnd_reg_num 
dw_cfi_oprnd_offset 
dw_cfi_oprnd_addr 
dw_cfi_oprnd_loc 
Each DIE may have a series of attribute/value pairs.  Values
   can take on several forms.  The forms that are used in this
   implementation are listed below.   
Enumerator:
dw_val_class_none 
dw_val_class_addr 
dw_val_class_offset 
dw_val_class_loc 
dw_val_class_loc_list 
dw_val_class_range_list 
dw_val_class_const 
dw_val_class_unsigned_const 
dw_val_class_const_double 
dw_val_class_vec 
dw_val_class_flag 
dw_val_class_die_ref 
dw_val_class_fde_ref 
dw_val_class_lbl_id 
dw_val_class_lineptr 
dw_val_class_str 
dw_val_class_macptr 
dw_val_class_file 
dw_val_class_data8 
dw_val_class_decl_ref 
dw_val_class_vms_delta 
dw_val_class_high_pc 

Function Documentation

struct dw_loc_descr_struct* build_cfa_aligned_loc ( dw_cfa_location cfa,
HOST_WIDE_INT  offset,
HOST_WIDE_INT  alignment 
)
read
This function builds a dwarf location descriptor sequence for
   the address at OFFSET from the CFA when stack is aligned to
   ALIGNMENT byte.   

References add_loc_descr(), cfa_loc::indirect, int_loc_descriptor(), loc_descr_plus_const(), new_loc_descr(), new_reg_loc_descr(), and cfa_loc::reg.

Referenced by reg_save().

struct dw_loc_descr_struct* build_cfa_loc ( dw_cfa_location ,
HOST_WIDE_INT   
)
read
Interface from dwarf2out.c to dwarf2cfi.c.   
bool cfa_equal_p ( const dw_cfa_location ,
const dw_cfa_location  
)
void debug ( die_struct ref)
void debug ( die_struct ptr)
void debug_dwarf ( void  )
Print all DWARF information collected for the compilation unit.
   This routine is a debugging aid only.   

References comp_unit_die(), and print_die().

void debug_dwarf_die ( struct die_struct )
enum dw_cfi_oprnd_type dw_cfi_oprnd1_desc ( enum dwarf_call_frame_info  cfi)
Interface from dwarf2*.c to the rest of the compiler.   
enum dw_cfi_oprnd_type dw_cfi_oprnd2_desc ( enum dwarf_call_frame_info  cfi)
void dwarf2out_decl ( tree  )
void dwarf2out_emit_cfi ( dw_cfi_ref  cfi)
void dwarf2out_set_demangle_name_func ( const char *  *)(const char *)
bool loc_descr_equal_p ( dw_loc_descr_ref  ,
dw_loc_descr_ref   
)
void lookup_cfa_1 ( dw_cfi_ref  cfi,
dw_cfa_location loc,
dw_cfa_location remember 
)
Interface from dwarf2cfi.c to dwarf2out.c.   
struct dw_loc_descr_struct* mem_loc_descriptor ( rtx  rtl,
enum machine_mode  mode,
enum machine_mode  mem_mode,
enum var_init_status  initialized 
)
read
The following routine converts the RTL for a variable or parameter
   (resident in memory) into an equivalent Dwarf representation of a
   mechanism for getting the address of that same variable onto the top of a
   hypothetical "address evaluation" stack.

   When creating memory location descriptors, we are effectively transforming
   the RTL for a memory-resident object into its Dwarf postfix expression
   equivalent.  This routine recursively descends an RTL tree, turning
   it into Dwarf postfix code as it goes.

   MODE is the mode that should be assumed for the rtl if it is VOIDmode.

   MEM_MODE is the mode of the memory reference, needed to handle some
   autoincrement addressing modes.

   Return 0 if we can't represent the location.   

References add_loc_descr(), dw_vec_struct::array, avoid_constant_pool_reference(), base_type_for_mode(), based_loc_descr(), bswap_loc_descriptor(), clz_loc_descriptor(), const_ok_for_output(), convert_descriptor_to_mode(), dbx_reg_number(), dw_val_struct::dw_val_struct_union::dw_val_die_union::die, do_binop(), do_unop(), dtprel_false, dtprel_true, dw_loc_descr_struct::dw_loc_oprnd1, dw_loc_descr_struct::dw_loc_oprnd2, dw_val_class_const, dw_val_class_const_double, dw_val_class_die_ref, dw_val_class_loc, dw_val_class_vec, dw_vec_struct::elt_size, expansion_failed(), dw_val_struct::dw_val_struct_union::dw_val_die_union::external, double_int::from_shwi(), get_address_mode(), HOST_BITS_PER_WIDE_INT, insert_float(), int_loc_descriptor(), is_based_loc(), dw_vec_struct::length, loc_descr_plus_const(), mem_loc_descriptor(), minmax_loc_descriptor(), mode_for_size(), new_addr_loc_descr(), new_loc_descr(), one_reg_loc_descriptor(), parameter_ref_descriptor(), popcount_loc_descriptor(), print_rtl(), ptr_mode, resolve_one_addr(), rotate_loc_descriptor(), rtx_to_double_int(), scompare_loc_descriptor(), shift, size_of_int_loc_descriptor(), subreg_lowpart_p(), targetm, tls_mem_loc_descriptor(), TLS_MODEL_NONE, trunc_int_for_mode(), typed_binop(), ucompare_loc_descriptor(), dw_val_struct::v, dw_val_struct::val_class, dw_val_struct::dw_val_struct_union::val_die_ref, dw_val_struct::dw_val_struct_union::val_double, dw_val_struct::dw_val_struct_union::val_loc, dw_val_struct::dw_val_struct_union::val_vec, VAR_INIT_STATUS_INITIALIZED, VAR_INIT_STATUS_UNINITIALIZED, vec_safe_push(), and word_mode.

Referenced by bswap_loc_descriptor(), clz_loc_descriptor(), cst_pool_loc_descr(), dw_loc_list_1(), dwarf2out_frame_debug_cfa_expression(), gen_subprogram_die(), loc_descriptor(), loc_list_from_tree(), mem_loc_descriptor(), minmax_loc_descriptor(), popcount_loc_descriptor(), reg_loc_descriptor(), rotate_loc_descriptor(), scompare_loc_descriptor(), typed_binop(), and ucompare_loc_descriptor().

void output_cfi ( dw_cfi_ref  ,
dw_fde_ref  ,
int   
)
void output_cfi_directive ( FILE *  f,
struct dw_cfi_struct cfi 
)
void output_loc_sequence ( dw_loc_descr_ref  ,
int   
)
void output_loc_sequence_raw ( dw_loc_descr_ref  )
unsigned long size_of_locs ( dw_loc_descr_ref  )

Variable Documentation

cfi_vec cie_cfi_vec
A vector of call frame insns for the CIE.   

Referenced by convert_cfa_to_fb_loc_list(), create_cie_data(), and output_call_frame_info().