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.  
     When CFA is defined as FP+OFFSET, emulate stack alignment.  

References LI_negate_stmt, LI_set_address, LI_set_column, LI_set_discriminator, LI_set_epilogue_begin, LI_set_file, LI_set_line, and LI_set_prologue_end.

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.  
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)
dw_fde_ref dwarf2out_alloc_current_fde ( void  )
   Allocate CURRENT_FDE.  Immediately initialize all we can, noting that
   this allocation may be done before pass_final.  
     Record the FDE associated with this function.  
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.  
     Note that for a dynamically sized array, the location we will generate a
     description of here will be the lowest numbered location which is
     actually within the array.  That's *not* necessarily the same as the
     zeroth element of the array.  
         The case of a subreg may arise when we have a local (register)
         variable or a formal (register) parameter which doesn't quite fill
         up an entire register.  For now, just assume that it is
         legitimate to make the Dwarf info refer to the whole register which
         contains the given subreg.  
         Whenever a register number forms a part of the description of the
         method for calculating the (dynamic) address of a memory resident
         object, DWARF rules require the register number be referred to as
         a "base register".  This distinction is not based in any way upon
         what category of register the hardware believes the given register
         belongs to.  This is strictly DWARF terminology we're dealing with
         here. Note that in cases where the location of a memory-resident
         data object could be expressed as: OP_ADD (OP_BASEREG (basereg),
         OP_CONST (0)) the actual DWARF location descriptor that we generate
         may just be OP_BASEREG (basereg).  This may look deceptively like
         the object in question was allocated to a register (rather than in
         memory) so DWARF consumers need to be aware of the subtle
         distinction between OP_REG and OP_BASEREG.  
             If RTL is internal_arg_pointer, which has been optimized
             out, use DRAP instead.  
                  If DW_OP_const{1,2,4}u won't be used, it is shorter
                  to expand zero extend as two shifts instead of
                  masking.  
         Some ports can transform a symbol ref into a label ref, because
         the symbol ref is too far away and has to be dumped into a constant
         pool.  
             If this is not defined, we have no way to emit the data.  
         Extract the PLUS expression nested inside and fall into
         PLUS code below.  
         Turn these into a PLUS expression and fall into the PLUS code
         below.  
         ... fall through ...  
       If a pseudo-reg is optimized away, it is possible for it to
       be replaced with a MEM containing a multiply or shift.  
                 const DW_OP_GNU_convert <XXX> vs.
                 DW_OP_GNU_const_type <XXX, 1, const>.  
             Note that a CONST_DOUBLE rtx could represent either an integer
             or a floating-point constant.  A CONST_DOUBLE is used whenever
             the constant requires more than one word in order to be
             adequately represented.  We output CONST_DOUBLEs as blocks.  
         FALLTHRU 
         In theory, we could implement the above.  
         DWARF cannot represent the unsigned compare operations
         natively.  
         If delegitimize_address couldn't do anything with the UNSPEC, we
         can't express it in the debug info.  This can happen e.g. with some
         TLS UNSPECs.  

Referenced by expansion_failed(), gen_formal_parameter_die(), reg_loc_descriptor(), and scompare_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.