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

Data Structures

struct  indirect_string_node
struct  dwarf_file_data
struct  deferred_locations_struct
struct  addr_table_entry_struct
union  addr_table_entry_struct::addr_table_entry_struct_union
struct  dw_loc_list_struct
struct  dw_line_info_struct
struct  dw_line_info_table_struct
struct  dw_attr_struct
struct  die_struct
union  die_struct::die_symbol_or_type_node
struct  pubname_struct
struct  dw_ranges_struct
struct  macinfo_struct
struct  dw_ranges_by_label_struct
struct  comdat_type_struct
struct  limbo_die_struct
struct  skeleton_chain_struct
struct  die_arg_entry_struct
struct  var_loc_node
struct  var_loc_list_def
struct  call_arg_loc_node
struct  cached_dw_loc_list_def
struct  checksum_attributes
struct  cu_hash_table_entry
struct  cu_hash_table_entry_hasher
struct  decl_table_entry
struct  decl_table_entry_hasher
struct  external_ref
struct  external_ref_hasher
struct  file_info
struct  dir_info
struct  file_name_acquire_data
struct  macinfo_entry_hasher
struct  comdat_type_hasher
struct  loc_list_hasher

Typedefs

typedef struct
deferred_locations_struct 
deferred_locations
typedef struct
addr_table_entry_struct 
addr_table_entry
typedef struct dw_loc_list_struct dw_loc_list_node
typedef long int dw_offset
typedef struct dw_attr_structdw_attr_ref
typedef struct
dw_line_info_struct
dw_line_info_ref
typedef struct pubname_structpubname_ref
typedef struct dw_ranges_structdw_ranges_ref
typedef struct
dw_ranges_by_label_struct
dw_ranges_by_label_ref
typedef struct comdat_type_structcomdat_type_node_ref
typedef struct dw_line_info_struct dw_line_info_entry
typedef struct
dw_line_info_table_struct 
dw_line_info_table
typedef dw_line_info_tabledw_line_info_table_p
typedef struct dw_attr_struct dw_attr_node
typedef struct die_struct die_node
typedef struct pubname_struct pubname_entry
typedef struct macinfo_struct macinfo_entry
typedef struct comdat_type_struct comdat_type_node
typedef struct limbo_die_struct limbo_die_node
typedef struct
skeleton_chain_struct 
skeleton_chain_node
typedef struct die_arg_entry_struct die_arg_entry
typedef struct var_loc_list_def var_loc_list
typedef struct
cached_dw_loc_list_def 
cached_dw_loc_list
typedef hash_table
< cu_hash_table_entry_hasher
cu_hash_type
typedef hash_table
< decl_table_entry_hasher
decl_hash_type
typedef hash_table
< external_ref_hasher
external_ref_hash_type
typedef const char * dchar_p
typedef hash_table
< macinfo_entry_hasher
macinfo_hash_type
typedef hash_table
< loc_list_hasher
loc_list_hash_type

Enumerations

enum  ate_kind { ate_kind_rtx, ate_kind_rtx_dtprel, ate_kind_label }
enum  dw_line_info_opcode {
  LI_set_address, LI_set_line, LI_set_file, LI_set_column,
  LI_negate_stmt, LI_set_prologue_end, LI_set_epilogue_begin, LI_set_discriminator
}
enum  dtprel_bool { dtprel_false = 0, dtprel_true = 1 }

Functions

static void dwarf2out_source_line (unsigned int, const char *, int, bool)
int vms_file_stats_name (const char *, long long *, long *, char *, int *)
static char * stripattributes (const char *)
static void output_call_frame_info (int)
static void dwarf2out_note_section_used (void)
static int matches_main_base ()
static int dump_struct_debug (tree type, enum debug_info_usage usage, enum debug_struct_file criterion, int generic, int matches, int result)
static bool should_emit_struct_debug ()
static char * stripattributes ()
static void switch_to_eh_frame_section ()
static void switch_to_frame_table_section ()
enum dw_cfi_oprnd_type dw_cfi_oprnd1_desc ()
enum dw_cfi_oprnd_type dw_cfi_oprnd2_desc ()
static void output_fde (dw_fde_ref fde, bool for_eh, bool second, char *section_start_label, int fde_encoding, char *augmentation, bool any_lsda_needed, int lsda_encoding)
static bool fde_needed_for_eh_p ()
static void output_call_frame_info ()
static void dwarf2out_do_cfi_startproc ()
dw_fde_ref dwarf2out_alloc_current_fde ()
void dwarf2out_begin_prologue (unsigned int line, const char *file)
void dwarf2out_vms_end_prologue (unsigned int line, const char *file)
void dwarf2out_vms_begin_epilogue (unsigned int line, const char *file)
void dwarf2out_end_epilogue (unsigned int line, const char *file)
void dwarf2out_frame_finish ()
static void var_location_switch_text_section (void)
static void set_cur_line_info_table (section *)
void dwarf2out_switch_text_section ()
static dw_loc_descr_ref int_loc_descriptor (HOST_WIDE_INT)
static const char * dwarf_stack_op_name ()
static dw_loc_descr_ref new_loc_descr (enum dwarf_location_atom op, unsigned HOST_WIDE_INT oprnd1, unsigned HOST_WIDE_INT oprnd2)
static dw_loc_descr_ref new_reg_loc_descr ()
static void add_loc_descr ()
static bool dw_val_equal_p ()
static bool loc_descr_equal_p_1 ()
bool loc_descr_equal_p ()
static void loc_descr_plus_const ()
static void loc_list_plus_const ()
static unsigned long int get_base_type_offset (dw_die_ref)
static unsigned long size_of_loc_descr ()
unsigned long size_of_locs ()
static HOST_WIDE_INT extract_int (const unsigned char *, unsigned)
static void get_ref_die_offset_label (char *, dw_die_ref)
static unsigned long int get_ref_die_offset (dw_die_ref)
static void output_loc_operands ()
void output_loc_sequence ()
static void output_loc_operands_raw ()
void output_loc_sequence_raw ()
struct dw_loc_descr_structbuild_cfa_loc ()
struct dw_loc_descr_structbuild_cfa_aligned_loc (dw_cfa_location *cfa, HOST_WIDE_INT offset, HOST_WIDE_INT alignment)
static int output_indirect_string (void **, void *)
static void dwarf2out_init (const char *)
static void dwarf2out_finish (const char *)
static void dwarf2out_assembly_start (void)
static void dwarf2out_define (unsigned int, const char *)
static void dwarf2out_undef (unsigned int, const char *)
static void dwarf2out_start_source_file (unsigned, const char *)
static void dwarf2out_end_source_file (unsigned)
static void dwarf2out_function_decl (tree)
static void dwarf2out_begin_block (unsigned, unsigned)
static void dwarf2out_end_block (unsigned, unsigned)
static bool dwarf2out_ignore_block (const_tree)
static void dwarf2out_global_decl (tree)
static void dwarf2out_type_decl (tree, int)
static void dwarf2out_imported_module_or_decl (tree, tree, tree, bool)
static void dwarf2out_imported_module_or_decl_1 (tree, tree, tree, dw_die_ref)
static void dwarf2out_abstract_function (tree)
static void dwarf2out_var_location (rtx)
static void dwarf2out_begin_function (tree)
static void dwarf2out_end_function (unsigned int)
static void dwarf2out_set_name (tree, tree)
static int is_pseudo_reg (const_rtx)
static tree type_main_variant (tree)
static int is_tagged_type (const_tree)
static const char * dwarf_tag_name (unsigned)
static const char * dwarf_attr_name (unsigned)
static const char * dwarf_form_name (unsigned)
static tree decl_ultimate_origin (const_tree)
static tree decl_class_context (tree)
static void add_dwarf_attr (dw_die_ref, dw_attr_ref)
static enum dw_val_class AT_class (dw_attr_ref)
static unsigned int AT_index (dw_attr_ref)
static void add_AT_flag (dw_die_ref, enum dwarf_attribute, unsigned)
static unsigned AT_flag (dw_attr_ref)
static void add_AT_int (dw_die_ref, enum dwarf_attribute, HOST_WIDE_INT)
static HOST_WIDE_INT AT_int (dw_attr_ref)
static void add_AT_unsigned (dw_die_ref, enum dwarf_attribute, unsigned HOST_WIDE_INT)
static unsigned HOST_WIDE_INT AT_unsigned (dw_attr_ref)
static void add_AT_double (dw_die_ref, enum dwarf_attribute, HOST_WIDE_INT, unsigned HOST_WIDE_INT)
static void add_AT_vec (dw_die_ref, enum dwarf_attribute, unsigned int, unsigned int, unsigned char *)
static void add_AT_data8 (dw_die_ref, enum dwarf_attribute, unsigned char *)
static hashval_t debug_str_do_hash (const void *)
static int debug_str_eq (const void *, const void *)
static void add_AT_string (dw_die_ref, enum dwarf_attribute, const char *)
static const char * AT_string (dw_attr_ref)
static enum dwarf_form AT_string_form (dw_attr_ref)
static void add_AT_die_ref (dw_die_ref, enum dwarf_attribute, dw_die_ref)
static void add_AT_specification (dw_die_ref, dw_die_ref)
static dw_die_ref AT_ref (dw_attr_ref)
static int AT_ref_external (dw_attr_ref)
static void set_AT_ref_external (dw_attr_ref, int)
static void add_AT_fde_ref (dw_die_ref, enum dwarf_attribute, unsigned)
static void add_AT_loc (dw_die_ref, enum dwarf_attribute, dw_loc_descr_ref)
static dw_loc_descr_ref AT_loc (dw_attr_ref)
static void add_AT_loc_list (dw_die_ref, enum dwarf_attribute, dw_loc_list_ref)
static dw_loc_list_ref AT_loc_list (dw_attr_ref)
static addr_table_entryadd_addr_table_entry (void *, enum ate_kind)
static void remove_addr_table_entry (addr_table_entry *)
static void add_AT_addr (dw_die_ref, enum dwarf_attribute, rtx, bool)
static rtx AT_addr (dw_attr_ref)
static void add_AT_lbl_id (dw_die_ref, enum dwarf_attribute, const char *)
static void add_AT_lineptr (dw_die_ref, enum dwarf_attribute, const char *)
static void add_AT_macptr (dw_die_ref, enum dwarf_attribute, const char *)
static void add_AT_offset (dw_die_ref, enum dwarf_attribute, unsigned HOST_WIDE_INT)
static void add_AT_range_list (dw_die_ref, enum dwarf_attribute, unsigned long, bool)
static const char * AT_lbl (dw_attr_ref)
static dw_attr_ref get_AT (dw_die_ref, enum dwarf_attribute)
static const char * get_AT_low_pc (dw_die_ref)
static const char * get_AT_hi_pc (dw_die_ref)
static const char * get_AT_string (dw_die_ref, enum dwarf_attribute)
static int get_AT_flag (dw_die_ref, enum dwarf_attribute)
static unsigned get_AT_unsigned (dw_die_ref, enum dwarf_attribute)
static dw_die_ref get_AT_ref (dw_die_ref, enum dwarf_attribute)
static bool is_cxx (void)
static bool is_fortran (void)
static bool is_ada (void)
static void remove_AT (dw_die_ref, enum dwarf_attribute)
static void remove_child_TAG (dw_die_ref, enum dwarf_tag)
static void add_child_die (dw_die_ref, dw_die_ref)
static dw_die_ref new_die (enum dwarf_tag, dw_die_ref, tree)
static dw_die_ref lookup_type_die (tree)
static dw_die_ref strip_naming_typedef (tree, dw_die_ref)
static dw_die_ref lookup_type_die_strip_naming_typedef (tree)
static void equate_type_number_to_die (tree, dw_die_ref)
static hashval_t decl_die_table_hash (const void *)
static int decl_die_table_eq (const void *, const void *)
static dw_die_ref lookup_decl_die (tree)
static hashval_t common_block_die_table_hash (const void *)
static int common_block_die_table_eq (const void *, const void *)
static hashval_t decl_loc_table_hash (const void *)
static int decl_loc_table_eq (const void *, const void *)
static var_loc_listlookup_decl_loc (const_tree)
static void equate_decl_number_to_die (tree, dw_die_ref)
static struct var_loc_nodeadd_var_loc_to_decl (tree, rtx, const char *)
static void print_spaces (FILE *)
static void print_die (dw_die_ref, FILE *)
static dw_die_ref push_new_compile_unit (dw_die_ref, dw_die_ref)
static dw_die_ref pop_compile_unit (dw_die_ref)
static void loc_checksum (dw_loc_descr_ref, struct md5_ctx *)
static void attr_checksum (dw_attr_ref, struct md5_ctx *, int *)
static void die_checksum (dw_die_ref, struct md5_ctx *, int *)
static void checksum_sleb128 (HOST_WIDE_INT, struct md5_ctx *)
static void checksum_uleb128 (unsigned HOST_WIDE_INT, struct md5_ctx *)
static void loc_checksum_ordered (dw_loc_descr_ref, struct md5_ctx *)
static void attr_checksum_ordered (enum dwarf_tag, dw_attr_ref, struct md5_ctx *, int *)
static void collect_checksum_attributes (struct checksum_attributes *, dw_die_ref)
static void die_checksum_ordered (dw_die_ref, struct md5_ctx *, int *)
static void checksum_die_context (dw_die_ref, struct md5_ctx *)
static void generate_type_signature (dw_die_ref, comdat_type_node *)
static int same_loc_p (dw_loc_descr_ref, dw_loc_descr_ref, int *)
static int same_dw_val_p (const dw_val_node *, const dw_val_node *, int *)
static int same_attr_p (dw_attr_ref, dw_attr_ref, int *)
static int same_die_p (dw_die_ref, dw_die_ref, int *)
static int same_die_p_wrap (dw_die_ref, dw_die_ref)
static void compute_section_prefix (dw_die_ref)
static int is_type_die (dw_die_ref)
static int is_comdat_die (dw_die_ref)
static int is_symbol_die (dw_die_ref)
static bool is_template_instantiation (dw_die_ref)
static void assign_symbol_names (dw_die_ref)
static void break_out_includes (dw_die_ref)
static int is_declaration_die (dw_die_ref)
static int should_move_die_to_comdat (dw_die_ref)
static dw_die_ref clone_as_declaration (dw_die_ref)
static dw_die_ref clone_die (dw_die_ref)
static dw_die_ref clone_tree (dw_die_ref)
static dw_die_ref copy_declaration_context (dw_die_ref, dw_die_ref)
static void generate_skeleton_ancestor_tree (skeleton_chain_node *)
static void generate_skeleton_bottom_up (skeleton_chain_node *)
static dw_die_ref generate_skeleton (dw_die_ref)
static dw_die_ref remove_child_or_replace_with_skeleton (dw_die_ref, dw_die_ref, dw_die_ref)
static void break_out_comdat_types (dw_die_ref)
static void copy_decls_for_unworthy_types (dw_die_ref)
static void add_sibling_attributes (dw_die_ref)
static void output_location_lists (dw_die_ref)
static int constant_size (unsigned HOST_WIDE_INT)
static unsigned long size_of_die (dw_die_ref)
static void calc_die_sizes (dw_die_ref)
static void calc_base_type_die_sizes (void)
static void mark_dies (dw_die_ref)
static void unmark_dies (dw_die_ref)
static void unmark_all_dies (dw_die_ref)
static unsigned long size_of_pubnames (vec< pubname_entry, va_gc > *)
static unsigned long size_of_aranges (void)
static enum dwarf_form value_format (dw_attr_ref)
static void output_value_format (dw_attr_ref)
static void output_abbrev_section (void)
static void output_die_abbrevs (unsigned long, dw_die_ref)
static void output_die_symbol (dw_die_ref)
static void output_die (dw_die_ref)
static void output_compilation_unit_header (void)
static void output_comp_unit (dw_die_ref, int)
static void output_comdat_type_unit (comdat_type_node *)
static const char * dwarf2_name (tree, int)
static void add_pubname (tree, dw_die_ref)
static void add_enumerator_pubname (const char *, dw_die_ref)
static void add_pubname_string (const char *, dw_die_ref)
static void add_pubtype (tree, dw_die_ref)
static void output_pubnames (vec< pubname_entry, va_gc > *)
static void output_aranges (unsigned long)
static unsigned int add_ranges_num (int)
static unsigned int add_ranges (const_tree)
static void add_ranges_by_labels (dw_die_ref, const char *, const char *, bool *, bool)
static void output_ranges (void)
static dw_line_info_tablenew_line_info_table (void)
static void output_line_info (bool)
static void output_file_names (void)
static dw_die_ref base_type_die (tree)
static int is_base_type (tree)
static dw_die_ref subrange_type_die (tree, tree, tree, dw_die_ref)
static dw_die_ref modified_type_die (tree, int, int, dw_die_ref)
static dw_die_ref generic_parameter_die (tree, tree, bool, dw_die_ref)
static dw_die_ref template_parameter_pack_die (tree, tree, dw_die_ref)
static int type_is_enum (const_tree)
static unsigned int dbx_reg_number (const_rtx)
static void add_loc_descr_op_piece (dw_loc_descr_ref *, int)
static dw_loc_descr_ref reg_loc_descriptor (rtx, enum var_init_status)
static dw_loc_descr_ref one_reg_loc_descriptor (unsigned int, enum var_init_status)
static dw_loc_descr_ref multiple_reg_loc_descriptor (rtx, rtx, enum var_init_status)
static dw_loc_descr_ref based_loc_descr (rtx, HOST_WIDE_INT, enum var_init_status)
static int is_based_loc (const_rtx)
static int resolve_one_addr (rtx *, void *)
static dw_loc_descr_ref concat_loc_descriptor (rtx, rtx, enum var_init_status)
static dw_loc_descr_ref loc_descriptor (rtx, enum machine_mode mode, enum var_init_status)
static dw_loc_list_ref loc_list_from_tree (tree, int)
static dw_loc_descr_ref loc_descriptor_from_tree (tree, int)
static HOST_WIDE_INT ceiling (HOST_WIDE_INT, unsigned int)
static tree field_type (const_tree)
static unsigned int simple_type_align_in_bits (const_tree)
static unsigned int simple_decl_align_in_bits (const_tree)
static unsigned HOST_WIDE_INT simple_type_size_in_bits (const_tree)
static HOST_WIDE_INT field_byte_offset (const_tree)
static void add_AT_location_description (dw_die_ref, enum dwarf_attribute, dw_loc_list_ref)
static void add_data_member_location_attribute (dw_die_ref, tree)
static bool add_const_value_attribute (dw_die_ref, rtx)
static void insert_int (HOST_WIDE_INT, unsigned, unsigned char *)
static void insert_double (double_int, unsigned char *)
static void insert_float (const_rtx, unsigned char *)
static rtx rtl_for_decl_location (tree)
static bool add_location_or_const_value_attribute (dw_die_ref, tree, bool, enum dwarf_attribute)
static bool tree_add_const_value_attribute (dw_die_ref, tree)
static bool tree_add_const_value_attribute_for_decl (dw_die_ref, tree)
static void add_name_attribute (dw_die_ref, const char *)
static void add_gnat_descriptive_type_attribute (dw_die_ref, tree, dw_die_ref)
static void add_comp_dir_attribute (dw_die_ref)
static void add_bound_info (dw_die_ref, enum dwarf_attribute, tree)
static void add_subscript_info (dw_die_ref, tree, bool)
static void add_byte_size_attribute (dw_die_ref, tree)
static void add_bit_offset_attribute (dw_die_ref, tree)
static void add_bit_size_attribute (dw_die_ref, tree)
static void add_prototyped_attribute (dw_die_ref, tree)
static dw_die_ref add_abstract_origin_attribute (dw_die_ref, tree)
static void add_pure_or_virtual_attribute (dw_die_ref, tree)
static void add_src_coords_attributes (dw_die_ref, tree)
static void add_name_and_src_coords_attributes (dw_die_ref, tree)
static void push_decl_scope (tree)
static void pop_decl_scope (void)
static dw_die_ref scope_die_for (tree, dw_die_ref)
static int local_scope_p (dw_die_ref)
static int class_scope_p (dw_die_ref)
static int class_or_namespace_scope_p (dw_die_ref)
static void add_type_attribute (dw_die_ref, tree, int, int, dw_die_ref)
static void add_calling_convention_attribute (dw_die_ref, tree)
static const char * type_tag (const_tree)
static tree member_declared_type (const_tree)
static const char * decl_start_label (tree)
static void gen_array_type_die (tree, dw_die_ref)
static void gen_descr_array_type_die (tree, struct array_descr_info *, dw_die_ref)
static void gen_entry_point_die (tree, dw_die_ref)
static dw_die_ref gen_enumeration_type_die (tree, dw_die_ref)
static dw_die_ref gen_formal_parameter_die (tree, tree, bool, dw_die_ref)
static dw_die_ref gen_formal_parameter_pack_die (tree, tree, dw_die_ref, tree *)
static void gen_unspecified_parameters_die (tree, dw_die_ref)
static void gen_formal_types_die (tree, dw_die_ref)
static void gen_subprogram_die (tree, dw_die_ref)
static void gen_variable_die (tree, tree, dw_die_ref)
static void gen_const_die (tree, dw_die_ref)
static void gen_label_die (tree, dw_die_ref)
static void gen_lexical_block_die (tree, dw_die_ref, int)
static void gen_inlined_subroutine_die (tree, dw_die_ref, int)
static void gen_field_die (tree, dw_die_ref)
static void gen_ptr_to_mbr_type_die (tree, dw_die_ref)
static dw_die_ref gen_compile_unit_die (const char *)
static void gen_inheritance_die (tree, tree, dw_die_ref)
static void gen_member_die (tree, dw_die_ref)
static void gen_struct_or_union_type_die (tree, dw_die_ref, enum debug_info_usage)
static void gen_subroutine_type_die (tree, dw_die_ref)
static void gen_typedef_die (tree, dw_die_ref)
static void gen_type_die (tree, dw_die_ref)
static void gen_block_die (tree, dw_die_ref, int)
static void decls_for_scope (tree, dw_die_ref, int)
static int is_redundant_typedef (const_tree)
static bool is_naming_typedef_decl (const_tree)
static dw_die_ref get_context_die (tree)
static void gen_namespace_die (tree, dw_die_ref)
static dw_die_ref gen_decl_die (tree, tree, dw_die_ref)
static dw_die_ref force_decl_die (tree)
static dw_die_ref force_type_die (tree)
static dw_die_ref setup_namespace_context (tree, dw_die_ref)
static dw_die_ref declare_in_namespace (tree, dw_die_ref)
static struct dwarf_file_datalookup_filename (const char *)
static void retry_incomplete_types (void)
static void gen_type_die_for_member (tree, tree, dw_die_ref)
static void gen_generic_params_dies (tree)
static void gen_tagged_type_die (tree, dw_die_ref, enum debug_info_usage)
static void gen_type_die_with_usage (tree, dw_die_ref, enum debug_info_usage)
static void splice_child_die (dw_die_ref, dw_die_ref)
static int file_info_cmp (const void *, const void *)
static dw_loc_list_ref new_loc_list (dw_loc_descr_ref, const char *, const char *, const char *)
static void output_loc_list (dw_loc_list_ref)
static char * gen_internal_sym (const char *)
static bool want_pubnames (void)
static void prune_unmark_dies (dw_die_ref)
static void prune_unused_types_mark_generic_parms_dies (dw_die_ref)
static void prune_unused_types_mark (dw_die_ref, int)
static void prune_unused_types_walk (dw_die_ref)
static void prune_unused_types_walk_attribs (dw_die_ref)
static void prune_unused_types_prune (dw_die_ref)
static void prune_unused_types (void)
static int maybe_emit_file (struct dwarf_file_data *fd)
static const char * AT_vms_delta1 (dw_attr_ref)
static const char * AT_vms_delta2 (dw_attr_ref)
static void add_AT_vms_delta (dw_die_ref, enum dwarf_attribute, const char *, const char *)
static void append_entry_to_tmpl_value_parm_die_table (dw_die_ref, tree)
static void gen_remaining_tmpl_value_param_die_attribute (void)
static bool generic_type_p (tree)
static void schedule_generic_params_dies_gen (tree t)
static void gen_scheduled_generic_parms_dies (void)
static const char * comp_dir_string (void)
static hashval_t hash_loc_operands (dw_loc_descr_ref, hashval_t)
static enum dwarf_location_atom dw_addr_op ()
static dw_loc_descr_ref new_addr_loc_descr ()
static dw_die_ref comp_unit_die ()
void dwarf2out_set_demangle_name_func (const char *(*func)(const char *))
static int is_pseudo_reg ()
static tree type_main_variant ()
static int is_tagged_type ()
static void get_ref_die_offset_label ()
static unsigned long int get_base_type_offset ()
static unsigned long int get_ref_die_offset ()
static const char * dwarf_tag_name ()
static const char * dwarf_attr_name ()
static const char * dwarf_form_name ()
static tree decl_ultimate_origin ()
static tree decl_class_context ()
static void add_dwarf_attr ()
static enum dw_val_class AT_class ()
static unsigned int AT_index ()
static void add_AT_flag ()
static unsigned AT_flag ()
static void add_AT_int ()
static HOST_WIDE_INT AT_int ()
static unsigned HOST_WIDE_INT AT_unsigned ()
static void add_AT_data8 (dw_die_ref die, enum dwarf_attribute attr_kind, unsigned char data8[8])
static void add_AT_low_high_pc (dw_die_ref die, const char *lbl_low, const char *lbl_high, bool force_direct)
static hashval_t debug_str_do_hash ()
static int debug_str_eq ()
static struct
indirect_string_node
find_AT_string_in_table ()
static struct
indirect_string_node
find_AT_string ()
static void add_AT_string ()
static const char * AT_string ()
static void set_indirect_string ()
static enum dwarf_form find_string_form ()
static enum dwarf_form AT_string_form ()
static void add_AT_die_ref ()
static void change_AT_die_ref ()
static void add_AT_specification ()
static dw_die_ref AT_ref ()
static int AT_ref_external ()
static void set_AT_ref_external ()
static void add_AT_fde_ref ()
static void add_AT_loc ()
static dw_loc_descr_ref AT_loc ()
static void add_AT_loc_list ()
static dw_loc_list_ref AT_loc_list ()
static dw_loc_list_refAT_loc_list_ptr ()
static hashval_t addr_table_entry_do_hash ()
static int addr_table_entry_eq ()
void init_addr_table_entry ()
static addr_table_entryadd_addr_table_entry ()
static void remove_addr_table_entry ()
static void remove_loc_list_addr_table_entries ()
static int index_addr_table_entry ()
static rtx AT_addr ()
static void add_AT_file (dw_die_ref die, enum dwarf_attribute attr_kind, struct dwarf_file_data *fd)
static struct dwarf_file_dataAT_file ()
static void add_AT_range_list (dw_die_ref die, enum dwarf_attribute attr_kind, long unsigned int offset, bool force_direct)
static const char * AT_vms_delta1 ()
static const char * AT_vms_delta2 ()
static const char * AT_lbl ()
static dw_attr_ref get_AT ()
static dw_die_ref get_die_parent ()
static const char * get_AT_low_pc ()
static const char * get_AT_hi_pc ()
static const char * get_AT_string ()
static int get_AT_flag ()
static unsigned get_AT_unsigned ()
static dw_die_ref get_AT_ref ()
static struct dwarf_file_dataget_AT_file ()
static bool is_java ()
static void remove_AT ()
static void remove_child_with_prev ()
static void replace_child ()
static void move_all_children ()
static void remove_child_TAG ()
static void add_child_die ()
static void splice_child_die ()
static dw_die_ref new_die ()
static dw_die_ref lookup_type_die ()
static dw_die_ref strip_naming_typedef ()
static dw_die_ref lookup_type_die_strip_naming_typedef ()
static void equate_type_number_to_die ()
static hashval_t decl_die_table_hash ()
static int decl_die_table_eq ()
static dw_die_ref lookup_decl_die ()
static hashval_t decl_loc_table_hash ()
static int decl_loc_table_eq ()
static var_loc_listlookup_decl_loc ()
static hashval_t cached_dw_loc_list_table_hash ()
static int cached_dw_loc_list_table_eq ()
static void equate_decl_number_to_die ()
static int decl_piece_bitsize ()
static rtxdecl_piece_varloc_ptr ()
static rtx decl_piece_node ()
static rtx construct_piece_list (rtx loc_note, HOST_WIDE_INT bitpos, HOST_WIDE_INT bitsize)
static void adjust_piece_list (rtx *dest, rtx *src, rtx *inner, HOST_WIDE_INT bitpos, HOST_WIDE_INT piece_bitpos, HOST_WIDE_INT bitsize, rtx loc_note)
static struct var_loc_nodeadd_var_loc_to_decl ()
static void print_spaces ()
static void print_signature ()
static void print_die ()
DEBUG_FUNCTION void debug_dwarf_die ()
DEBUG_FUNCTION void debug ()
DEBUG_FUNCTION void debug_dwarf ()
static dw_die_ref push_new_compile_unit ()
static dw_die_ref pop_compile_unit ()
static void loc_checksum ()
static void attr_checksum ()
static void die_checksum ()
static void checksum_sleb128 ()
static void checksum_uleb128 ()
static void checksum_die_context ()
static void loc_checksum_ordered ()
static void collect_checksum_attributes ()
static void die_checksum_ordered ()
static void die_odr_checksum ()
static void generate_type_signature ()
static int same_loc_p ()
static int same_dw_val_p ()
static int same_attr_p ()
static int same_die_p ()
static int same_die_p_wrap ()
static void compute_section_prefix ()
static int is_type_die ()
static int is_comdat_die ()
static int is_symbol_die ()
static bool is_cu_die ()
static bool is_unit_die ()
static bool is_namespace_die ()
static bool is_class_die ()
static bool is_template_parameter ()
static bool is_template_instantiation ()
static char * gen_internal_sym ()
static void assign_symbol_names ()
static int check_duplicate_cu ()
static void record_comdat_symbol_number (dw_die_ref cu, cu_hash_type htable, unsigned int sym_num)
static void break_out_includes ()
static int is_declaration_die ()
static int is_nested_in_subprogram ()
static int contains_subprogram_definition ()
static int should_move_die_to_comdat ()
static dw_die_ref clone_die ()
static dw_die_ref clone_tree ()
static dw_die_ref clone_as_declaration ()
static dw_die_ref copy_ancestor_tree ()
static dw_die_ref copy_declaration_context ()
static void generate_skeleton_ancestor_tree ()
static void generate_skeleton_bottom_up ()
static dw_die_ref generate_skeleton ()
static void break_out_comdat_types ()
static dw_die_ref clone_tree_hash ()
static void copy_decls_walk ()
static void copy_decls_for_unworthy_types ()
static void add_sibling_attributes ()
static void output_location_lists ()
static struct external_reflookup_external_ref ()
static void optimize_external_refs_1 ()
int dwarf2_build_local_stub ()
static external_ref_hash_type optimize_external_refs ()
static void build_abbrev_table ()
static int constant_size ()
static unsigned long size_of_die ()
static void calc_die_sizes ()
static void mark_dies ()
static void unmark_dies ()
static void unmark_all_dies ()
static bool include_pubname_in_output ()
static unsigned long size_of_pubnames ()
static enum dwarf_form value_format ()
static void output_value_format ()
static void output_die_abbrevs ()
static void output_die_symbol ()
static void gen_llsym ()
static void output_loc_list ()
static void output_range_list_offset ()
static void output_loc_list_offset ()
static void output_attr_index_or_value ()
static void output_signature ()
static void output_die ()
static void output_comp_unit ()
static void add_AT_pubnames ()
static void add_skeleton_AT_string (dw_die_ref die, enum dwarf_attribute attr_kind, const char *str)
static void add_top_level_skeleton_die_attrs ()
static dw_die_ref get_skeleton_type_unit ()
static void output_skeleton_debug_sections ()
static void output_comdat_type_unit ()
static const char * dwarf2_name ()
static void add_pubname_string ()
static void add_pubname ()
static void add_enumerator_pubname ()
static void add_pubtype ()
static void output_pubname ()
static void output_pubnames ()
static void output_pubtables ()
static void output_aranges ()
static unsigned int add_ranges_num ()
static unsigned int add_ranges ()
static int file_info_cmp ()
static int file_name_acquire ()
static void output_one_line_info_table ()
static void output_line_info ()
static dw_die_ref base_type_die ()
static int is_base_type ()
static unsigned HOST_WIDE_INT simple_type_size_in_bits ()
static double_int double_int_type_size_in_bits ()
static dw_die_ref subrange_type_die ()
static void gen_generic_params_dies ()
static int type_is_enum ()
static unsigned int dbx_reg_number ()
static void add_loc_descr_op_piece ()
static dw_loc_descr_ref reg_loc_descriptor ()
static dw_loc_descr_ref one_reg_loc_descriptor ()
static unsigned long size_of_int_loc_descriptor (HOST_WIDE_INT)
static dw_loc_descr_ref int_shift_loc_descriptor ()
static dw_loc_descr_ref int_loc_descriptor ()
static unsigned long size_of_int_shift_loc_descriptor ()
static unsigned long size_of_int_loc_descriptor ()
static dw_loc_descr_ref address_of_int_loc_descriptor ()
static int is_based_loc ()
static dw_loc_descr_ref tls_mem_loc_descriptor ()
static void expansion_failed ()
static int const_ok_for_output_1 ()
static bool const_ok_for_output ()
static dw_die_ref base_type_for_mode ()
static dw_loc_descr_ref convert_descriptor_to_mode ()
static dw_loc_descr_ref compare_loc_descriptor (enum dwarf_location_atom op, dw_loc_descr_ref op0, dw_loc_descr_ref op1)
static dw_loc_descr_ref scompare_loc_descriptor (enum dwarf_location_atom op, rtx rtl, enum machine_mode mem_mode)
static dw_loc_descr_ref ucompare_loc_descriptor (enum dwarf_location_atom op, rtx rtl, enum machine_mode mem_mode)
static dw_loc_descr_ref minmax_loc_descriptor (rtx rtl, enum machine_mode mode, enum machine_mode mem_mode)
static dw_loc_descr_ref typed_binop (enum dwarf_location_atom op, rtx rtl, dw_die_ref type_die, enum machine_mode mode, enum machine_mode mem_mode)
static dw_loc_descr_ref clz_loc_descriptor (rtx rtl, enum machine_mode mode, enum machine_mode mem_mode)
static dw_loc_descr_ref popcount_loc_descriptor (rtx rtl, enum machine_mode mode, enum machine_mode mem_mode)
static dw_loc_descr_ref bswap_loc_descriptor (rtx rtl, enum machine_mode mode, enum machine_mode mem_mode)
static dw_loc_descr_ref rotate_loc_descriptor (rtx rtl, enum machine_mode mode, enum machine_mode mem_mode)
static dw_loc_descr_ref parameter_ref_descriptor ()
dw_loc_descr_ref mem_loc_descriptor (rtx rtl, enum machine_mode mode, enum machine_mode mem_mode, enum var_init_status initialized)
static dw_loc_descr_ref concat_loc_descriptor ()
static dw_loc_descr_ref concatn_loc_descriptor ()
static dw_loc_descr_ref implicit_ptr_descriptor ()
static const char * secname_for_decl ()
static bool decl_by_reference_p ()
static dw_loc_descr_ref dw_loc_list_1 (tree loc, rtx varloc, int want_address, enum var_init_status initialized)
static dw_loc_descr_ref new_loc_descr_op_bit_piece ()
static dw_loc_descr_ref dw_sra_loc_expr ()
static dw_loc_list_ref dw_loc_list ()
static bool single_element_loc_list_p ()
static void add_loc_descr_to_each ()
static void add_loc_list ()
static dw_loc_descr_ref cst_pool_loc_descr ()
static dw_loc_list_ref loc_list_for_address_of_addr_expr_of_indirect_ref ()
static dw_loc_list_ref loc_list_from_tree ()
static dw_loc_descr_ref loc_descriptor_from_tree ()
static HOST_WIDE_INT ceiling ()
static tree field_type ()
static unsigned simple_type_align_in_bits ()
static unsigned simple_decl_align_in_bits ()
static double_int round_up_to_align ()
static HOST_WIDE_INT field_byte_offset ()
static void add_accessibility_attribute ()
static void add_data_member_location_attribute ()
static void insert_int ()
static HOST_WIDE_INT extract_int ()
static void insert_double ()
static void insert_float ()
static bool add_const_value_attribute ()
static tree reference_to_unused (tree *tp, int *walk_subtrees, void *data)
static rtx rtl_for_decl_init ()
static rtx rtl_for_decl_location ()
static tree fortran_common ()
static void defer_location ()
static bool native_encode_initializer ()
static bool tree_add_const_value_attribute ()
static bool tree_add_const_value_attribute_for_decl ()
static dw_loc_list_ref convert_cfa_to_fb_loc_list ()
static void compute_frame_pointer_to_fb_displacement ()
static void add_name_attribute ()
static void add_comp_dir_attribute ()
static int lower_bound_default ()
static void add_bound_info ()
static void add_subscript_info ()
static void add_byte_size_attribute ()
static void add_bit_offset_attribute ()
static void add_bit_size_attribute ()
static void add_prototyped_attribute ()
static dw_die_ref add_abstract_origin_attribute ()
static void add_pure_or_virtual_attribute ()
static void add_linkage_attr ()
static void add_src_coords_attributes ()
static void add_linkage_name ()
static void add_name_and_src_coords_attributes ()
void dwarf2out_vms_debug_main_pointer ()
static void push_decl_scope ()
static tree uses_local_type_r ()
static tree uses_local_type ()
static dw_die_ref scope_die_for ()
static int local_scope_p ()
static int class_scope_p ()
static int class_or_namespace_scope_p ()
static void add_calling_convention_attribute ()
static const char * type_tag ()
static tree member_declared_type ()
static const char * decl_start_label ()
static void gen_array_type_die ()
static dw_loc_descr_ref descr_info_loc ()
static void add_descr_info_field (dw_die_ref die, enum dwarf_attribute attr, tree val, tree base_decl)
static void gen_entry_point_die ()
static enum dwarf_tag record_type_tag ()
static dw_die_ref gen_enumeration_type_die ()
static void gen_unspecified_parameters_die ()
static void gen_formal_types_die ()
static void gen_type_die_for_member ()
static void set_decl_origin_self (tree)
static void set_decl_abstract_flags (tree, int)
static void set_block_origin_self ()
static void set_decl_origin_self ()
static void set_block_abstract_flags ()
static void set_decl_abstract_flags ()
static void dwarf2out_abstract_function ()
static int premark_used_types_helper ()
static int premark_types_used_by_global_vars_helper (void **slot, void *data)
static void premark_used_types ()
static void premark_types_used_by_global_vars ()
static dw_die_ref gen_call_site_die (tree decl, dw_die_ref subr_die, struct call_arg_loc_node *ca_loc)
static void gen_subprogram_die ()
static hashval_t common_block_die_table_hash ()
static int common_block_die_table_eq ()
static void gen_variable_die ()
static void gen_const_die ()
static void gen_label_die ()
static void add_call_src_coords_attributes ()
static void add_high_low_attributes ()
static void gen_lexical_block_die ()
static void gen_inlined_subroutine_die ()
static void gen_field_die ()
static void gen_pointer_type_die ()
static void gen_reference_type_die ()
static void gen_ptr_to_mbr_type_die ()
static char * gen_producer_string ()
static dw_die_ref gen_compile_unit_die ()
static void gen_inheritance_die ()
static void gen_member_die ()
static void gen_subroutine_type_die ()
static void gen_typedef_die ()
static void gen_type_die ()
static void gen_block_die ()
static void process_scope_var ()
static void decls_for_scope ()
static int is_redundant_typedef ()
static bool is_naming_typedef_decl ()
static dw_die_ref get_context_die ()
static dw_die_ref force_decl_die ()
static dw_die_ref force_type_die ()
static dw_die_ref setup_namespace_context ()
static dw_die_ref declare_in_namespace ()
static void gen_namespace_die ()
static dw_die_ref gen_decl_die ()
static void dwarf2out_global_decl ()
static void dwarf2out_type_decl ()
void dwarf2out_decl ()
static void dwarf2out_function_decl ()
static void dwarf2out_begin_block (unsigned int line, unsigned int blocknum)
static void dwarf2out_end_block ()
static bool dwarf2out_ignore_block ()
static int file_table_eq ()
static hashval_t file_table_hash ()
static struct dwarf_file_datalookup_filename ()
static int maybe_emit_file ()
static void append_entry_to_tmpl_value_parm_die_table ()
static bool generic_type_p ()
static void schedule_generic_params_dies_gen ()
static void dwarf2out_set_name ()
static void dwarf2out_var_location ()
static int var_location_switch_text_section_1 ()
static void set_cur_line_info_table ()
static void dwarf2out_begin_function ()
static int find_empty_loc_ranges_at_text_label ()
static void dwarf2out_end_function ()
static void push_dw_line_info_entry (dw_line_info_table *table, enum dw_line_info_opcode opcode, unsigned int val)
static void dwarf2out_start_source_file ()
static void dwarf2out_end_source_file ()
static void output_macinfo_op ()
static unsigned optimize_macinfo_range (unsigned int idx, vec< macinfo_entry, va_gc > *files, macinfo_hash_type *macinfo_htab)
static void save_macinfo_strings ()
static void output_macinfo ()
static void dwarf2out_init ()
static int index_string ()
static int output_index_string_offset ()
static int output_index_string ()
static int output_indirect_string ()
static void output_indirect_strings ()
static int output_addr_table_entry ()
static void output_addr_table ()
static void verify_marks_clear ()
static void prune_unmark_dies ()
static void prune_unused_types_walk_attribs ()
static void prune_unused_types_mark_generic_parms_dies ()
static void prune_unused_types_mark ()
static void prune_unused_types_walk_local_classes ()
static void prune_unused_types_walk ()
static void prune_unused_types_update_strings ()
static void prune_unused_types_prune ()
static int file_table_relative_p ()
static void move_linkage_attr ()
static void mark_base_types ()
static int base_type_cmp ()
static void move_marked_base_types ()
static int resolve_one_addr ()
static rtx string_cst_pool_decl ()
static bool optimize_one_addr_into_implicit_ptr ()
static bool resolve_addr_in_expr ()
static void optimize_location_into_implicit_ptr ()
static void resolve_addr ()
static hashval_t hash_loc_operands ()
static hashval_t hash_locs ()
static void hash_loc_list ()
static bool compare_loc_operands ()
static bool compare_locs ()
static void optimize_location_lists_1 ()
static void index_location_lists ()
static void optimize_location_lists ()
static void dwarf2out_finish ()

Variables

static rtx last_var_location_insn
static rtx cached_next_real_insn
static vec< rtx, va_gc > * used_rtx_array
static vec< tree, va_gc > * incomplete_types
static vec< tree, va_gc > * decl_scope_table
static sectiondebug_info_section
static sectiondebug_skeleton_info_section
static sectiondebug_abbrev_section
static sectiondebug_skeleton_abbrev_section
static sectiondebug_aranges_section
static sectiondebug_addr_section
static sectiondebug_macinfo_section
static sectiondebug_line_section
static sectiondebug_skeleton_line_section
static sectiondebug_loc_section
static sectiondebug_pubnames_section
static sectiondebug_pubtypes_section
static sectiondebug_str_section
static sectiondebug_str_dwo_section
static sectiondebug_str_offsets_section
static sectiondebug_ranges_section
static sectiondebug_frame_section
static vec< dw_fde_ref, va_gc > * fde_vec
static htab_t debug_str_hash
static htab_t skeleton_debug_str_hash
static int dw2_string_counter
static bool have_multiple_function_sections = false
static bool text_section_used = false
static bool cold_text_section_used = false
static sectioncold_text_section
static rtx current_unit_personality
static vec< deferred_locations,
va_gc > * 
deferred_locations_list
struct gcc_debug_hooks dwarf2_debug_hooks
static unsigned long next_die_offset
static dw_die_ref single_comp_unit_die
static comdat_type_nodecomdat_type_list
static limbo_die_nodelimbo_die_list
static limbo_die_nodedeferred_asm_name
static htab_t file_table
static htab_t decl_die_table
static htab_t common_block_die_table
static htab_t decl_loc_table
static struct call_arg_loc_nodecall_arg_locations
static struct call_arg_loc_nodecall_arg_loc_last
static int call_site_count = -1
static int tail_call_site_count = -1
static vec< dw_die_refblock_map
static htab_t cached_dw_loc_list_table
static dw_die_refabbrev_die_table
static unsigned abbrev_die_table_allocated
static unsigned abbrev_die_table_in_use
static unsigned int line_info_label_num
static dw_line_info_tablecur_line_info_table
static dw_line_info_tabletext_section_line_info
static dw_line_info_tablecold_text_section_line_info
static vec
< dw_line_info_table_p, va_gc > * 
separate_line_info
static bool info_section_emitted
static vec< pubname_entry,
va_gc > * 
pubname_table
static vec< pubname_entry,
va_gc > * 
pubtype_table
static vec< macinfo_entry,
va_gc > * 
macinfo_table
static dw_ranges_ref ranges_table
static unsigned ranges_table_allocated
static unsigned ranges_table_in_use
static dw_ranges_by_label_ref ranges_by_label
static unsigned ranges_by_label_allocated
static unsigned ranges_by_label_in_use
static bool have_location_lists
static unsigned int loclabel_num
static unsigned int poc_label_num
static int current_function_has_inlines
static struct dwarf_file_datalast_emitted_file
static int label_num
static struct dwarf_file_datafile_table_last_lookup
static vec< die_arg_entry,
va_gc > * 
tmpl_value_parm_die_table
static vec< tree, va_gc > * generic_type_instances
static HOST_WIDE_INT frame_pointer_fb_offset
static bool frame_pointer_fb_offset_valid
static vec< dw_die_refbase_types
static char text_end_label [MAX_ARTIFICIAL_LABEL_BYTES]
static char text_section_label [MAX_ARTIFICIAL_LABEL_BYTES]
static char cold_text_section_label [MAX_ARTIFICIAL_LABEL_BYTES]
static char cold_end_label [MAX_ARTIFICIAL_LABEL_BYTES]
static char abbrev_section_label [MAX_ARTIFICIAL_LABEL_BYTES]
static char debug_info_section_label [MAX_ARTIFICIAL_LABEL_BYTES]
static char debug_skeleton_info_section_label [MAX_ARTIFICIAL_LABEL_BYTES]
static char debug_skeleton_abbrev_section_label [MAX_ARTIFICIAL_LABEL_BYTES]
static char debug_line_section_label [MAX_ARTIFICIAL_LABEL_BYTES]
static char debug_addr_section_label [MAX_ARTIFICIAL_LABEL_BYTES]
static char debug_skeleton_line_section_label [MAX_ARTIFICIAL_LABEL_BYTES]
static char macinfo_section_label [MAX_ARTIFICIAL_LABEL_BYTES]
static char loc_section_label [MAX_ARTIFICIAL_LABEL_BYTES]
static char ranges_section_label [2 *MAX_ARTIFICIAL_LABEL_BYTES]
static const char *(* demangle_name_func )(const char *)
static htab_t addr_index_table
static int print_indent
static const char * comdat_symbol_id
static unsigned int comdat_symbol_number
static char * producer_string
static bool in_first_function_p = true
static bool maybe_at_text_label_p = true
static unsigned int first_loclabel_num_not_at_text_label

Typedef Documentation

   The comdat type node structure.  
typedef const char* dchar_p
typedef struct die_struct die_node
   The Debugging Information Entry (DIE) structure.  DIEs form a tree.
   The children of each node form a circular list linked by
   die_sib.  die_child points to the node *before* the "first" child node.  
typedef struct dw_attr_struct dw_attr_node
   Each DIE attribute has a field specifying the attribute kind,
   a link to the next attribute in the chain, and an attribute value.
   Attributes are typically linked below the DIE they modify.  
typedef struct dw_attr_struct* dw_attr_ref
   Define typedefs here to avoid circular dependencies.  
   Location lists are ranges + location descriptions for that range,
   so you can track variables that are in different places over
   their entire life.  
typedef long int dw_offset
   Various DIE's use offsets relative to the beginning of the
   .debug_info section to refer to each other.  
   The limbo die list structure.  
typedef struct macinfo_struct macinfo_entry
   A structure to hold a macinfo entry.  
typedef struct pubname_struct pubname_entry
   The pubname structure 
typedef struct pubname_struct* pubname_ref

Enumeration Type Documentation

enum ate_kind
   Describe an entry into the .debug_addr section.  
Enumerator:
ate_kind_rtx 
ate_kind_rtx_dtprel 
ate_kind_label 
   enum for tracking thread-local variables whose address is really an offset
   relative to the TLS pointer, which will need link-time relocation, but will
   not need relocation by the DWARF consumer.  
Enumerator:
dtprel_false 
dtprel_true 
   The entries in the line_info table more-or-less mirror the opcodes
   that are used in the real dwarf line table.  Arrays of these entries
   are collected per section when DWARF2_ASM_LINE_DEBUG_INFO is not
   supported.  
Enumerator:
LI_set_address 
     Emit DW_LNE_set_address; the operand is the label index.  
LI_set_line 
     Emit a row to the matrix with the given line.  This may be done
     via any combination of DW_LNS_copy, DW_LNS_advance_line, and
     special opcodes.  
LI_set_file 
     Emit a DW_LNS_set_file.  
LI_set_column 
     Emit a DW_LNS_set_column.  
LI_negate_stmt 
     Emit a DW_LNS_negate_stmt; the operand is ignored.  
LI_set_prologue_end 
     Emit a DW_LNS_set_prologue_end/epilogue_begin; the operand is ignored.  
LI_set_epilogue_begin 
LI_set_discriminator 
     Emit a DW_LNE_set_discriminator.  

Function Documentation

static dw_die_ref add_abstract_origin_attribute ( dw_die_ref  ,
tree   
)
static
static dw_die_ref add_abstract_origin_attribute ( )
inlinestatic
   Add an 'abstract_origin' attribute below a given DIE.  The DIE is found
   by looking in either the type declaration or object declaration
   equate table.  
         We may have gotten separated from the block for the inlined
         function, if we're in an exception handler or some such; make
         sure that the abstract function has been written out.

         Doing this for nested functions is wrong, however; functions are
         distinct units, and our context might not even be inline.  
     XXX: Functions that are never lowered don't always have correct block
     trees (in the case of java, they simply have no block tree, in some other
     languages).  For these functions, there is nothing we can really do to
     output correct debug info for inlined functions in all cases.  Rather
     than die, we'll just produce deficient debug info now, in that we will
     have variables without a proper abstract origin.  In the future, when all
     functions are lowered, we should re-add a gcc_assert (origin_die)
     here.  

References add_abstract_origin_attribute(), add_AT_flag(), add_location_or_const_value_attribute(), add_name_and_src_coords_attributes(), add_type_attribute(), decl_by_reference_p(), decl_function_context(), decl_ultimate_origin(), equate_decl_number_to_die(), new_die(), tcc_declaration, tcc_type, and variably_modified_type_p().

static void add_accessibility_attribute ( )
static
   Add DW_AT_accessibility attribute to DIE if needed.  
     In DWARF3+ the default is DW_ACCESS_private only in DW_TAG_class_type
     children, otherwise the default is DW_ACCESS_public.  In DWARF2
     the default has always been DW_ACCESS_public.  

Referenced by add_bit_offset_attribute().

static addr_table_entry* add_addr_table_entry ( void *  ,
enum  ate_kind 
)
static
static addr_table_entry* add_addr_table_entry ( )
static
   Add attr to the address table entry to the table.  Defer setting an
   index until output time.  

References AT_ref(), die_struct::die_attr, dw_attr_struct::dw_attr, and get_AT().

static void add_AT_addr ( dw_die_ref  die,
enum dwarf_attribute  attr_kind,
rtx  addr,
bool  force_direct 
)
inlinestatic
   Add an address constant attribute value to a DIE.  When using
   dwarf_split_debug_info, address attributes in dies destined for the
   final executable should be direct references--setting the parameter
   force_direct ensures this behavior.  

References AT_unsigned(), and get_AT().

static void add_AT_data8 ( dw_die_ref  ,
enum  dwarf_attribute,
unsigned char *   
)
static
static void add_AT_data8 ( dw_die_ref  die,
enum dwarf_attribute  attr_kind,
unsigned char  data8[8] 
)
inlinestatic
static void add_AT_die_ref ( dw_die_ref  ,
enum  dwarf_attribute,
dw_die_ref   
)
static

Referenced by add_AT_vec(), and is_symbol_die().

static void add_AT_die_ref ( )
inlinestatic
   Add a DIE reference attribute value to a DIE.  
     With LTO we can end up trying to reference something we didn't create
     a DIE for.  Avoid crashing later on a NULL referenced DIE.  

References addr_table_entry_struct::index, and addr_table_entry_struct::refcount.

static void add_AT_double ( dw_die_ref  die,
enum dwarf_attribute  attr_kind,
HOST_WIDE_INT  high,
unsigned HOST_WIDE_INT  low 
)
inlinestatic
   Add an unsigned double integer attribute value to a DIE.  

Referenced by add_bit_offset_attribute().

static void add_AT_fde_ref ( dw_die_ref  ,
enum  dwarf_attribute,
unsigned   
)
static
static void add_AT_file ( dw_die_ref  die,
enum dwarf_attribute  attr_kind,
struct dwarf_file_data fd 
)
inlinestatic
   Add a file attribute value to a DIE.  

Referenced by gen_array_type_die().

static void add_AT_flag ( dw_die_ref  ,
enum  dwarf_attribute,
unsigned   
)
static
static void add_AT_flag ( )
inlinestatic
   Add a flag value attribute to a DIE.  
static void add_AT_int ( dw_die_ref  ,
enum  dwarf_attribute,
HOST_WIDE_INT   
)
static
static void add_AT_int ( )
inlinestatic
   Add a signed integer attribute value to a DIE.  
static void add_AT_lbl_id ( dw_die_ref  die,
enum dwarf_attribute  attr_kind,
const char *  lbl_id 
)
inlinestatic
static void add_AT_lineptr ( dw_die_ref  die,
enum dwarf_attribute  attr_kind,
const char *  label 
)
inlinestatic
   Add a section offset attribute value to a DIE, an offset into the
   debug_line section.  

References die_struct::die_child, die_struct::die_parent, and die_struct::die_sib.

static void add_AT_loc ( dw_die_ref  ,
enum  dwarf_attribute,
dw_loc_descr_ref   
)
static
static void add_AT_loc ( )
inlinestatic
static void add_AT_loc_list ( dw_die_ref  ,
enum  dwarf_attribute,
dw_loc_list_ref   
)
static
static void add_AT_location_description ( dw_die_ref  die,
enum dwarf_attribute  attr_kind,
dw_loc_list_ref  descr 
)
inlinestatic
   The following routines define various Dwarf attributes and any data
   associated with them.  
   Add a location description attribute value to a DIE.

   This emits location attributes suitable for whole variables and
   whole parameters.  Note that the location attributes for struct fields are
   generated by the routine `data_member_location_attribute' below.  
static void add_AT_low_high_pc ( dw_die_ref  die,
const char *  lbl_low,
const char *  lbl_high,
bool  force_direct 
)
inlinestatic
   Add DW_AT_low_pc and DW_AT_high_pc to a DIE.  When using
   dwarf_split_debug_info, address attributes in dies destined for the
   final executable have force_direct set to avoid using indexed
   references.  

References add_dwarf_attr(), dw_attr_struct::dw_attr, dw_attr_struct::dw_attr_val, dw_val_class_fde_ref, dw_val_struct::v, dw_val_struct::val_class, dw_val_struct::val_entry, and dw_val_struct::dw_val_struct_union::val_fde_index.

Referenced by add_descr_info_field(), and move_linkage_attr().

static void add_AT_macptr ( dw_die_ref  die,
enum dwarf_attribute  attr_kind,
const char *  label 
)
inlinestatic
   Add a section offset attribute value to a DIE, an offset into the
   debug_macinfo section.  

References die_struct::die_child, die_struct::die_parent, and die_struct::die_sib.

static void add_AT_offset ( dw_die_ref  die,
enum dwarf_attribute  attr_kind,
unsigned HOST_WIDE_INT  offset 
)
inlinestatic
   Add an offset attribute value to a DIE.  
static void add_AT_pubnames ( )
static
   Add the DW_AT_GNU_pubnames and DW_AT_GNU_pubtypes attributes.  
static void add_AT_range_list ( dw_die_ref  ,
enum  dwarf_attribute,
unsigned  long,
bool   
)
static
static void add_AT_range_list ( dw_die_ref  die,
enum dwarf_attribute  attr_kind,
long unsigned int  offset,
bool  force_direct 
)
static
     For the range_list attribute, use val_entry to store whether the
     offset should follow split-debug-info or normal semantics.  This
     value is read in output_range_list_offset.  

References die_struct::die_child, die_struct::die_sib, die_struct::die_tag, and remove_child_with_prev().

static void add_AT_specification ( dw_die_ref  ,
dw_die_ref   
)
static

Referenced by gen_array_type_die().

static void add_AT_specification ( )
inlinestatic
   Add an AT_specification attribute to a DIE, and also make the back
   pointer from the specification to the definition.  

References AT_class(), dw_attr_struct::dw_attr_val, dw_val_class_addr, dw_val_struct::v, and dw_val_struct::dw_val_struct_union::val_addr.

static void add_AT_string ( dw_die_ref  ,
enum  dwarf_attribute,
const char *   
)
static
static void add_AT_unsigned ( dw_die_ref  die,
enum dwarf_attribute  attr_kind,
unsigned HOST_WIDE_INT  unsigned_val 
)
inlinestatic
static void add_AT_vec ( dw_die_ref  die,
enum dwarf_attribute  attr_kind,
unsigned int  length,
unsigned int  elt_size,
unsigned char *  array 
)
inlinestatic
   Add a floating point attribute value to a DIE and return it.  

References add_AT_die_ref(), and die_struct::die_definition.

Referenced by add_const_value_attribute().

static void add_AT_vms_delta ( dw_die_ref  die,
enum dwarf_attribute  attr_kind,
const char *  lbl1,
const char *  lbl2 
)
inlinestatic
   Add a vms delta attribute value to a DIE.  

References comp_unit_die(), and get_AT_unsigned().

Referenced by gen_descr_array_type_die().

static void add_bit_offset_attribute ( dw_die_ref  ,
tree   
)
static
static void add_bit_offset_attribute ( )
inlinestatic
   For a FIELD_DECL node which represents a bit-field, output an attribute
   which specifies the distance in bits from the highest order bit of the
   "containing object" for the bit-field to the highest order bit of the
   bit-field itself.

   For any given bit-field, the "containing object" is a hypothetical object
   (of some integral or enum type) within which the given bit-field lives.  The
   type of this hypothetical "containing object" is always the same as the
   declared type of the individual bit-field itself.  The determination of the
   exact location of the "containing object" for a bit-field is rather
   complicated.  It's handled by the `field_byte_offset' function (above).

   Note that it is the size (in bytes) of the hypothetical "containing object"
   which will be given in the DW_AT_byte_size attribute for this bit-field.
   (See `byte_size_attribute' above).  
     Must be a field and a bit field.  
     We can't yet handle bit-fields whose offsets are variable, so if we
     encounter such things, just return without generating any attribute
     whatsoever.  Likewise for variable or too large size.  
     Note that the bit offset is always the distance (in bits) from the
     highest-order bit of the "containing object" to the highest-order bit of
     the bit-field itself.  Since the "high-order end" of any object or field
     is different on big-endian and little-endian machines, the computation
     below must take account of these differences.  

References add_accessibility_attribute(), add_AT_double(), add_AT_int(), add_byte_size_attribute(), add_child_die(), add_name_attribute(), add_src_coords_attributes(), die_struct::die_parent, HOST_BITS_PER_WIDE_INT, host_integerp(), new_die(), scope_die_for(), and simple_type_size_in_bits().

static void add_bit_size_attribute ( dw_die_ref  ,
tree   
)
static
static void add_bit_size_attribute ( )
inlinestatic
   For a FIELD_DECL node which represents a bit field, output an attribute
   which specifies the length in bits of the given field.  
     Must be a field and a bit field.  
static void add_bound_info ( dw_die_ref  ,
enum  dwarf_attribute,
tree   
)
static

Referenced by lower_bound_default().

static void add_bound_info ( )
static
   Given a tree node describing an array bound (either lower or upper) output
   a representation for that bound.  
       All fixed-bounds are represented by INTEGER_CST nodes.  
           Use the default if possible.  
           Otherwise represent the bound as an unsigned value with the
           precision of its type.  The precision and signedness of the
           type will be necessary to re-interpret it unambiguously.  
           ??? Can this happen, or should the variable have been bound
           first?  Probably it can, since I imagine that we try to create
           the types of parameters in the order in which they exist in
           the list, and won't have created a forward reference to a
           later parameter.  
         FALLTHRU 
           Otherwise try to create a stack operation procedure to
           evaluate the value of the array bound.  
               If DW_AT_*bound is not a reference nor constant, it is
               a DWARF expression rather than location description.
               For that loc_list_from_tree (bound, 0) is needed.
               If that fails to give a single element list,
               fall back to outputting this as a reference anyway.  
static void add_byte_size_attribute ( dw_die_ref  ,
tree   
)
static
static void add_byte_size_attribute ( )
static
         For a data member of a struct or union, the DW_AT_byte_size is
         generally given as the number of bytes normally allocated for an
         object of the *declared* type of the member itself.  This is true
         even for bit-fields.  
     Note that `size' might be -1 when we get to this point.  If it is, that
     indicates that the byte size of the entity in question is variable.  We
     have no good way of expressing this fact in Dwarf at the present time,
     so just let the -1 pass on through.  
static void add_call_src_coords_attributes ( )
inlinestatic
   A helper function for gen_inlined_subroutine_die.  Add source coordinate
   attributes to the DIE for a block STMT, to describe where the inlined
   function was called from.  This is similar to add_src_coords_attributes.  
static void add_calling_convention_attribute ( dw_die_ref  ,
tree   
)
static
static void add_calling_convention_attribute ( )
static
   Given an object die, add the calling convention attribute for the
   function call type.  
         DWARF 2 doesn't provide a way to identify a program's source-level
        entry point.  DW_AT_calling_convention attributes are only meant
        to describe functions' calling conventions.  However, lacking a
        better way to signal the Fortran main program, we used this for 
        a long time, following existing custom.  Now, DWARF 4 has 
        DW_AT_main_subprogram, which we add below, but some tools still
        rely on the old way, which we thus keep.  
     Only add the attribute if the backend requests it, and
     is not DW_CC_normal.  
static void add_child_die ( )
static
   Add a CHILD_DIE as the last child of DIE.  
     FIXME this should probably be an assert.  
static void add_comp_dir_attribute ( dw_die_ref  )
static
static void add_comp_dir_attribute ( )
static
   Generate a DW_AT_comp_dir attribute for DIE.  
static bool add_const_value_attribute ( dw_die_ref  ,
rtx   
)
static

Referenced by insert_float().

static bool add_const_value_attribute ( )
static
   Attach a DW_AT_const_value attribute for a variable or a parameter which
   does not have a "location" either in memory or in a register.  These
   things can arise in GNU C when a constant is passed as an actual parameter
   to an inlined function.  They can also arise in C++ where declared
   constants do not necessarily get memory "homes".  
         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.  
         FALLTHROUGH 
         In cases where an inlined instance of an inline function is passed
         the address of an `auto' variable (which is local to the caller) we
         can get a situation where the DECL_RTL of the artificial local
         variable (for the inlining) which acts as a stand-in for the
         corresponding formal parameter (of the inline function) will look
         like (plus:SI (reg:SI FRAME_PTR) (const_int ...)).  This is not
         exactly a compile-time constant expression, but it isn't the address
         of the (artificial) local variable either.  Rather, it represents the
         *value* which the artificial local variable always has during its
         lifetime.  We currently have no way to represent such quasi-constant
         values in Dwarf, so for now we just punt and generate nothing.  
         No other kinds of rtx should be possible here.  

References add_AT_vec().

static void add_data_member_location_attribute ( dw_die_ref  ,
tree   
)
static
static void add_data_member_location_attribute ( )
static
   Attach the specialized form of location attribute used for data members of
   struct and union types.  In the special case of a FIELD_DECL node which
   represents a bit-field, the "offset" part of this special location
   descriptor must indicate the distance in bytes from the lowest-addressed
   byte of the containing struct or union type to the lowest-addressed byte of
   the "containing object" for the bit-field.  (See the `field_byte_offset'
   function above).

   For any given bit-field, the "containing object" is a hypothetical object
   (of some integral or enum type) within which the given bit-field lives.  The
   type of this hypothetical "containing object" is always the same as the
   declared type of the individual bit-field itself (for GCC anyway... the
   DWARF spec doesn't actually mandate this).  Note that it is the size (in
   bytes) of the hypothetical "containing object" which will be given in the
   DW_AT_byte_size attribute for this bit-field.  (See the
   `byte_size_attribute' function below.)  It is also used when calculating the
   value of the DW_AT_bit_offset attribute.  (See the `bit_offset_attribute'
   function below.)  
         We're working on the TAG_inheritance for a base class.  
             For C++ virtual bases we can't just use BINFO_OFFSET, as they
             aren't at a fixed offset from all (sub)objects of the same
             type.  We need to extract the appropriate offset from our
             vtable.  The following dwarf expression means

               BaseAddr = ObAddr + *((*ObAddr) - Offset)

             This is specific to the V3 ABI, of course.  
             Make a copy of the object address.  
             Extract the vtable address.  
             Calculate the address of the offset.  
             Extract the offset.  
             Add it to the object address.  
             Don't need to output a location expression, just the constant. 
             The DWARF2 standard says that we should assume that the structure
             address is already on the stack, so we can specify a structure
             field address by using DW_OP_plus_uconst.  

References count, host_integerp(), constructor_elt_d::index, int_size_in_bytes(), memcpy(), memset(), native_encode_initializer(), tree_low_cst(), type(), and constructor_elt_d::value.

static void add_descr_info_field ( dw_die_ref  die,
enum dwarf_attribute  attr,
tree  val,
tree  base_decl 
)
static

References add_AT_low_high_pc().

static void add_dwarf_attr ( )
inlinestatic
   Add an attribute/value pair to a DIE.  
     Maybe this should be an assert?  
static void add_enumerator_pubname ( const char *  ,
dw_die_ref   
)
static
static void add_enumerator_pubname ( )
static
   Add an enumerator to the pubnames section.  

References g.

static void add_gnat_descriptive_type_attribute ( dw_die_ref  die,
tree  type,
dw_die_ref  context_die 
)
static
   Retrieve the descriptive type of TYPE, if any, make sure it has a
   DIE and attach a DW_AT_GNAT_descriptive_type attribute to the DIE
   of TYPE accordingly.

   ??? This is a temporary measure until after we're able to generate
   regular DWARF for the complex Ada type system.  

References add_name_attribute(), is_ada(), is_fortran(), new_die(), scope_die_for(), and type_tag().

static void add_high_low_attributes ( )
inlinestatic
   A helper function for gen_lexical_block_die and gen_inlined_subroutine_die.
   Add low_pc and high_pc attributes to the DIE for a block STMT.  
         Optimize duplicate .debug_ranges lists or even tails of
         lists.  If this BLOCK has same ranges as its supercontext,
         lookup DW_AT_ranges attribute in the supercontext (and
         recursively so), verify that the ranges_table contains the
         right values and use it instead of adding a new .debug_range.  
static void add_linkage_attr ( )
static
   Add a DW_AT_linkage_name or DW_AT_MIPS_linkage_name attribute for the
   given decl.  This used to be a vendor extension until after DWARF 4
   standardized it.  
     Mimic what assemble_name_raw does with a leading '*'.  
static void add_linkage_name ( )
static
   Add DW_AT_{,MIPS_}linkage_name attribute for the given decl.  
         Defer until we have an assembler name set.  

Referenced by gen_array_type_die().

static void add_loc_descr ( )
inlinestatic
   Add a location description term to a location description expression.  
     Find the end of the chain.  

Referenced by add_loc_descr_op_piece(), dbx_reg_number(), modified_type_die(), reg_loc_descriptor(), and scompare_loc_descriptor().

static void add_loc_descr_op_piece ( dw_loc_descr_ref ,
int   
)
static
static void add_loc_descr_op_piece ( )
static
   Optionally add a DW_OP_piece term to a location description expression.
   DW_OP_piece is only added if the location description expression already
   doesn't end with DW_OP_piece.  
         Find the end of the chain.  

References add_loc_descr(), int_loc_descriptor(), and new_loc_descr().

static void add_loc_descr_to_each ( )
static
   To each location in list LIST add loc descr REF.  
static void add_loc_list ( )
static
   Given two lists RET and LIST
   produce location list that is result of adding expression in LIST
   to expression in RET on each position in program.
   Might be destructive on both RET and LIST.

   TODO: We handle only simple cases of RET or LIST having at most one
   element. General case would inolve sorting the lists in program order
   and merging them that will need some additional work.
   Adding that will improve quality of debug info especially for SRA-ed
   structures.  

References bit_position(), tree_to_double_int(), and type().

static bool add_location_or_const_value_attribute ( dw_die_ref  die,
tree  decl,
bool  cache_p,
enum dwarf_attribute  attr 
)
static
   Generate *either* a DW_AT_location attribute or else a DW_AT_const_value
   data attribute for a variable or a parameter.  We generate the
   DW_AT_const_value attribute only in those cases where the given variable
   or parameter does not have a true "location" either in memory or in a
   register.  This can happen (for example) when a constant is passed as an
   actual argument in a call to an inline function.  (It's possible that
   these things can crop up in other ways also.)  Note that one type of
   constant value which can be passed into an inlined function is a constant
   pointer.  This can happen for example if an actual argument in an inlined
   function call evaluates to a compile-time constant address.

   CACHE_P is true if it is worth caching the location list for DECL,
   so that future calls can reuse it rather than regenerate it from scratch.
   This is true for BLOCK_NONLOCALIZED_VARS in inlined subroutines,
   since we will need to refer to them each time the function is inlined.  
     Try to get some constant RTL for this decl, and use that as the value of
     the location.  
     See if we have single element location list that is equivalent to
     a constant value.  That way we are better to use add_const_value_attribute
     rather than expanding constant value equivalent.  
     If this decl is from BLOCK_NONLOCALIZED_VARS, we might need its
     list several times.  See if we've already cached the contents.  
         It is usually worth caching this result if the decl is from
         BLOCK_NONLOCALIZED_VARS and if the list has at least two elements.  
     None of that worked, so it must not really have a location;
     try adding a constant value attribute from the DECL_INITIAL.  

References add_AT_unsigned(), host_integerp(), and tree_low_cst().

Referenced by add_abstract_origin_attribute().

static void add_name_and_src_coords_attributes ( dw_die_ref  ,
tree   
)
static
static void add_name_and_src_coords_attributes ( )
static
   Add a DW_AT_name attribute and source coordinate attribute for the
   given decl, but only if it actually has a name.  
     Get the function's name, as described by its RTL.  This may be different
     from the DECL_NAME name used in the source file.  
static void add_name_attribute ( dw_die_ref  ,
const char *   
)
static
static void add_name_attribute ( )
static
   Generate a DW_AT_name attribute given some string value to be included as
   the value of the attribute.  
static void add_prototyped_attribute ( dw_die_ref  ,
tree   
)
static
static void add_prototyped_attribute ( )
inlinestatic
   If the compiled language is ANSI C, then add a 'prototyped'
   attribute, if arg types are given for the parameters of a function.  
static void add_pubname ( tree  ,
dw_die_ref   
)
static

Referenced by gen_array_type_die().

static void add_pubname ( )
static
     Don't add items to the table when we expect that the consumer will have
     just read the enclosing die.  For example, if the consumer is looking at a
     class_member, it will either be inside the class already, or will have just
     looked up the class to find the member.  Either way, searching the class is
     faster than searching the index.  
static void add_pubname_string ( const char *  ,
dw_die_ref   
)
static
static void add_pubname_string ( )
static
   Add a new entry to .debug_pubnames if appropriate.  
static void add_pubtype ( tree  ,
dw_die_ref   
)
static
static void add_pubtype ( )
static
   Add a new entry to .debug_pubtypes if appropriate.  
         If we don't have a name for the type, there's no point in adding
         it to the table.  
         Although it might be more consistent to add the pubinfo for the
         enumerators as their dies are created, they should only be added if the
         enum type meets the criteria above.  So rather than re-check the parent
         enum type whenever an enumerator die is created, just output them all
         here.  This isn't protected by the name conditional because anonymous
         enums don't have names.  

References dir_info::count, file_info::dir_idx, dir_info::dir_idx, dw2_asm_output_data(), file_info_cmp(), file_name_acquire(), file_table, file_name_acquire_data::files, file_info::fname, dir_info::length, file_name_acquire_data::max_files, path, file_info::path, dir_info::path, dir_info::prefix, and file_name_acquire_data::used_files.

static void add_pure_or_virtual_attribute ( dw_die_ref  ,
tree   
)
static
static void add_pure_or_virtual_attribute ( )
inlinestatic
   We do not currently support the pure_virtual attribute.  
         GNU extension: Record what type this method came from originally.  
static unsigned int add_ranges ( const_tree  )
static
static unsigned int add_ranges ( )
static
   Add a new entry to .debug_ranges corresponding to a block, or a
   range terminator if BLOCK is NULL.  
static void add_ranges_by_labels ( dw_die_ref  die,
const char *  begin,
const char *  end,
bool *  added,
bool  force_direct 
)
static
   Add a new entry to .debug_ranges corresponding to a pair of labels.
   When using dwarf_split_debug_info, address attributes in dies destined
   for the final executable should be direct references--setting the
   parameter force_direct ensures this behavior.  
static unsigned int add_ranges_num ( int  )
static
static unsigned int add_ranges_num ( )
static
   Add a new entry to .debug_ranges.  Return the offset at which it
   was placed.  
static void add_sibling_attributes ( dw_die_ref  )
static
static void add_sibling_attributes ( )
static
   Traverse the DIE and add a sibling attribute if it may have the
   effect of speeding up access to siblings.  To save some space,
   avoid generating sibling attributes for DIE's without children.  
static void add_skeleton_AT_string ( dw_die_ref  die,
enum dwarf_attribute  attr_kind,
const char *  str 
)
inlinestatic
   Add a string attribute value to a skeleton DIE.  
static void add_src_coords_attributes ( dw_die_ref  ,
tree   
)
static
static void add_src_coords_attributes ( )
static
   Add source coordinate attributes for the given decl.  
static void add_subscript_info ( dw_die_ref  ,
tree  ,
bool   
)
static
static void add_subscript_info ( )
static
   Add subscript info to TYPE_DIE, describing an array TYPE, collapsing
   possibly nested array subscripts in a flat sequence if COLLAPSE_P is true.
   Note that the block of subscript information for an array type also
   includes information about the element type of the given array type.  
         Arrays come in three flavors: Unspecified bounds, fixed bounds,
         and (in GNU C only) variable bounds.  Handle all three forms
         here.  
             We have an array type with specified bounds.  
             Define the index type.  
                 ??? This is probably an Ada unnamed subrange type.  Ignore the
                 TREE_TYPE field.  We can't emit debug info for this
                 because it is an unnamed integral type.  
             ??? If upper is NULL, the array has unspecified length,
             but it does have a lower bound.  This happens with Fortran
               dimension arr(N:*)
             Since the debugger is definitely going to need to know N
             to produce useful results, go ahead and output the lower
             bound solo, and hope the debugger can cope.  
         Otherwise we have an array type with an unspecified length.  The
         DWARF-2 spec does not say how to handle this; let's just leave out the
         bounds.  
static void add_top_level_skeleton_die_attrs ( )
static
   Helper function to generate top-level dies for skeleton debug_info and
   debug_types.  

References add_ranges_num().

static void add_type_attribute ( dw_die_ref  object_die,
tree  type,
int  decl_const,
int  decl_volatile,
dw_die_ref  context_die 
)
static
   Many forms of DIEs require a "type description" attribute.  This
   routine locates the proper "type descriptor" die for the type given
   by 'type', and adds a DW_AT_type attribute below the given die.  
     ??? If this type is an unnamed subrange type of an integral, floating-point
     or fixed-point type, use the inner type.  This is because we have no
     support for unnamed types in base_type_die.  This can happen if this is
     an Ada subrange type.  Correct solution is emit a subrange type die.  
         Handle a special case.  For functions whose return type is void, we
         generate *no* type attribute.  (Note that no object may have type
         `void', so this only applies to function return types).  

References comp_unit_die(), decl_class_context(), decl_function_context(), and gen_type_die_for_member().

Referenced by add_abstract_origin_attribute().

static struct var_loc_node* add_var_loc_to_decl ( tree  ,
rtx  ,
const char *   
)
staticread
static struct var_loc_node* add_var_loc_to_decl ( )
staticread
   Add a variable location node to the linked list for DECL.  
     For PARM_DECLs try to keep around the original incoming value,
     even if that means we'll emit a zero-range .debug_loc entry.  
         TEMP->LAST here is either pointer to the last but one or
         last element in the chained list, LAST is pointer to the
         last element.  
             For SRA optimized variables if there weren't any real
             insns since last note, just modify the last node.  
             If the last note doesn't cover any instructions, remove it.  
         If the current location is the same as the end of the list,
         and either both or neither of the locations is uninitialized,
         we have nothing to do.  
             Add LOC to the end of list and update LAST.  If the last
             element of the list has been removed above, reuse its
             memory for the new node, otherwise allocate a new one.  
             Ensure TEMP->LAST will point either to the new last but one
             element of the chain, or to the last element in it.  
static dw_loc_descr_ref address_of_int_loc_descriptor ( )
static
   Return loc description representing "address" of integer value.
   This can appear only as toplevel expression.  
     Determine if DW_OP_stack_value or DW_OP_implicit_value
     is more compact.  For DW_OP_stack_value we need:
     litsize + 1 (DW_OP_stack_value)
     and for DW_OP_implicit_value:
     1 (DW_OP_implicit_value) + 1 (length) + size.  
static void adjust_piece_list ( rtx dest,
rtx src,
rtx inner,
HOST_WIDE_INT  bitpos,
HOST_WIDE_INT  piece_bitpos,
HOST_WIDE_INT  bitsize,
rtx  loc_note 
)
static
   This function either modifies location piece list *DEST in
   place (if SRC and INNER is NULL), or copies location piece list
   *SRC to *DEST while modifying it.  Location BITPOS is modified
   to contain LOC_NOTE, any pieces overlapping it are removed resp.
   not copied and if needed some padding around it is added.
   When modifying in place, DEST should point to EXPR_LIST where
   earlier pieces cover PIECE_BITPOS bits, when copying SRC points
   to the start of the whole list and INNER points to the EXPR_LIST
   where earlier pieces cover PIECE_BITPOS bits.  
         First copy all nodes preceding the current bitpos.  
     Add padding if needed.  
         A piece with correct bitpos and bitsize already exist,
         just update the location for it and return.  
     Add the piece that changed.  
     Skip over pieces that overlap it.  
     Add padding if needed.  
     Finally copy all nodes following it.  

Referenced by decl_die_table_hash().

static void append_entry_to_tmpl_value_parm_die_table ( dw_die_ref  ,
tree   
)
static
static void append_entry_to_tmpl_value_parm_die_table ( )
static
   Schedule generation of a DW_AT_const_value attribute to DIE.
   That generation should happen after function debug info has been
   generated. The value of the attribute is the constant value of ARG.  

References dwarf2out_do_cfi_asm(), and UI_DWARF2.

static void assign_symbol_names ( dw_die_ref  )
static
static void assign_symbol_names ( )
static
static rtx AT_addr ( dw_attr_ref  )
inlinestatic
static rtx AT_addr ( )
inlinestatic
   Get the RTX from to an address DIE attribute.  
static enum dw_val_class AT_class ( )
inlinestatic
static struct dwarf_file_data* AT_file ( )
staticread
   Get the dwarf_file_data from a file DIE attribute.  

References comp_unit_die(), and get_AT_unsigned().

static unsigned AT_flag ( dw_attr_ref  )
inlinestatic
static unsigned AT_flag ( )
inlinestatic
static unsigned int AT_index ( dw_attr_ref  )
inlinestatic
static unsigned int AT_index ( )
inlinestatic
   Return the index for any attribute that will be referenced with a
   DW_FORM_GNU_addr_index or DW_FORM_GNU_str_index.  String indices
   are stored in dw_attr_val.v.val_str for reference counting
   pruning.  

References indirect_string_node::label.

static HOST_WIDE_INT AT_int ( dw_attr_ref  )
inlinestatic
static HOST_WIDE_INT AT_int ( )
inlinestatic
static const char* AT_lbl ( dw_attr_ref  )
inlinestatic
static const char* AT_lbl ( )
inlinestatic
static dw_loc_descr_ref AT_loc ( dw_attr_ref  )
inlinestatic

Referenced by clone_tree_hash(), and size_of_aranges().

static dw_loc_descr_ref AT_loc ( )
inlinestatic
static dw_loc_list_ref AT_loc_list ( dw_attr_ref  )
inlinestatic
static dw_loc_list_ref AT_loc_list ( )
inlinestatic
static dw_die_ref AT_ref ( dw_attr_ref  )
inlinestatic
static dw_die_ref AT_ref ( )
inlinestatic
static int AT_ref_external ( dw_attr_ref  )
inlinestatic
static int AT_ref_external ( )
inlinestatic
static const char* AT_string ( dw_attr_ref  )
inlinestatic

Referenced by index_addr_table_entry().

static enum dwarf_form AT_string_form ( dw_attr_ref  )
static
static enum dwarf_form AT_string_form ( )
static
   Find out whether the string referenced from the attribute should be
   output inline in DIE or out-of-line in .debug_str section.  
static unsigned HOST_WIDE_INT AT_unsigned ( dw_attr_ref  )
inlinestatic
static unsigned HOST_WIDE_INT AT_unsigned ( )
inlinestatic
static const char* AT_vms_delta1 ( dw_attr_ref  )
inlinestatic
static const char* AT_vms_delta1 ( )
inlinestatic
   Return the start label of a delta attribute.  

References die_struct::die_parent.

static const char* AT_vms_delta2 ( dw_attr_ref  )
inlinestatic
static const char* AT_vms_delta2 ( )
inlinestatic
   Return the end label of a delta attribute.  

References die_struct::die_child, and die_struct::die_sib.

static void attr_checksum ( dw_attr_ref  ,
struct md5_ctx *  ,
int *   
)
static
static void attr_checksum ( )
static
   Calculate the checksum of an attribute.  
     We don't care that this was compiled with a different compiler
     snapshot; if the output is the same, that's what matters.  
static void attr_checksum_ordered ( enum dwarf_tag  tag,
dw_attr_ref  at,
struct md5_ctx *  ctx,
int *  mark 
)
static
   Calculate the checksum of an attribute.  
         For pointer and reference types, we checksum only the (qualified)
         name of the target type (if there is a name).  For friend entries,
         we checksum only the (qualified) name of the target type or function.
         This allows the checksum to remain the same whether the target type
         is complete or not.  
         For all other references to another DIE, we check to see if the
         target DIE has already been visited.  If it has, we emit a
         backward reference; if not, we descend recursively.  
static int base_type_cmp ( )
static
   Comparison function for sorting marked base types.  
static dw_die_ref base_type_die ( tree  )
static
static dw_die_ref base_type_die ( )
static
   Given a pointer to a tree node for some base type, return a pointer to
   a DIE that describes the given type.

   This routine must only be called for GCC type nodes that correspond to
   Dwarf base (fundamental) types.  
     If this is a subtype that should not be emitted as a subrange type,
     use the base type.  See subrange_type_for_debug_p.  
         Dwarf2 doesn't know anything about complex ints, so use
         a user defined type for it.  
         GNU FORTRAN/Ada/C++ BOOLEAN type.  
         No other TREE_CODEs are Dwarf fundamental types.  
static dw_die_ref base_type_for_mode ( )
static
   Return a reference to DW_TAG_base_type corresponding to MODE and UNSIGNEDP
   if possible, NULL otherwise.  

Referenced by bswap_loc_descriptor(), dbx_reg_number(), reg_loc_descriptor(), and scompare_loc_descriptor().

static dw_loc_descr_ref based_loc_descr ( rtx  reg,
HOST_WIDE_INT  offset,
enum var_init_status  initialized 
)
static
   Return a location descriptor that designates a base+offset location.  
     We only use "frame base" when we're sure we're talking about the
     post-prologue local stack frame.  We do this by *not* running
     register elimination until this point, and recognizing the special
     argument pointer and soft frame pointer rtx's.  
             If drap register is used to align stack, use frame
             pointer + offset to access stack variables.  If stack
             is aligned without drap, use stack pointer + offset to
             access stack variables.  
         Use cfa+offset to represent the location of arguments passed
         on the stack when drap is used to align stack.
         Only do this when not optimizing, for optimized code var-tracking
         is supposed to track where the arguments live and the register
         used as vdrap or drap in some spot might be used for something
         else in other part of the routine.  
static void break_out_comdat_types ( dw_die_ref  )
static
static void break_out_comdat_types ( )
static
   Traverse the DIE and set up additional .debug_types sections for each
   type worthy of being placed in a COMDAT section.  
           Break out nested types into their own type units.  
           Create a new type unit DIE as the root for the new tree, and
           add it to the list of comdat types.  
           Generate the type signature.  
           Copy the declaration context, attributes, and children of the
           declaration into the new type unit DIE, then remove this DIE
           from the main CU (or replace it with a skeleton if necessary).  
           Add the DIE to the new compunit.  
           Look for nested types that can be broken out.  
static void break_out_includes ( dw_die_ref  )
static
static void break_out_includes ( )
static
   Traverse the DIE (which is always comp_unit_die), and set up
   additional compilation units for each of the include files we see
   bracketed by BINCL/EINCL.  
           This DIE is for a secondary CU; remove it from the main one.  
     We can only use this in debugging, since the frontend doesn't check
     to make sure that we leave every include file we enter.  

References add_child_die(), clone_die(), die_struct::die_sib, generate_skeleton_ancestor_tree(), generate_skeleton_bottom_up(), is_declaration_die(), is_template_instantiation(), move_all_children(), skeleton_chain_struct::new_die, skeleton_chain_struct::old_die, remove_child_with_prev(), and replace_child().

static dw_loc_descr_ref bswap_loc_descriptor ( rtx  rtl,
enum machine_mode  mode,
enum machine_mode  mem_mode 
)
static
   BSWAP (constS is initial shift count, either 56 or 24):
       constS const0
   L1: DW_OP_pick <2> constS DW_OP_pick <3> DW_OP_minus DW_OP_shr
       const255 DW_OP_and DW_OP_pick <2> DW_OP_shl DW_OP_or
       DW_OP_swap DW_OP_dup const0 DW_OP_eq DW_OP_bra <L2> const8
       DW_OP_minus DW_OP_swap DW_OP_skip <L1>
   L2: DW_OP_drop DW_OP_swap DW_OP_drop  

References base_type_for_mode(), do_binop(), and typed_binop().

static void build_abbrev_table ( )
static
   The format of each DIE (and its attribute value pairs) is encoded in an
   abbreviation table.  This routine builds the abbreviation table and assigns
   a unique abbreviation id for each abbreviation entry.  The children of each
   die are visited recursively.  
     Scan the DIE references, and replace any that refer to
     DIEs from other CUs (i.e. those which are not marked) with
     the local stubs we built in optimize_external_refs.  
             We aren't changing this reference, so mark it external.  

Referenced by output_loc_list_offset().

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 ( )
read
   This function builds a dwarf location descriptor sequence from a
   dw_cfa_location, adding the given OFFSET to the result of the
   expression.  
static int cached_dw_loc_list_table_eq ( )
static
   Return nonzero if decl_id of cached_dw_loc_list X is the same as
   UID of decl *Y.  
static hashval_t cached_dw_loc_list_table_hash ( )
static
   Returns a hash value for X (which really is a cached_dw_loc_list_list).  
static void calc_base_type_die_sizes ( )
static
   Size just the base type children at the start of the CU.
   This is needed because build_abbrev needs to size locs
   and sizing of type based stack ops needs to know die_offset
   values for the base types.  
static void calc_die_sizes ( dw_die_ref  )
static
static void calc_die_sizes ( )
static
   Size the debugging information associated with a given DIE.  Visits the
   DIE's children recursively.  Updates the global variable next_die_offset, on
   each time through.  Uses the current value of next_die_offset to update the
   die_offset field in each DIE.  
       Count the null byte used to terminate sibling lists.  

References dw_loc_list_struct::begin, dw_loc_list_struct::begin_entry, dw2_asm_output_data(), dw2_asm_output_data_uleb128(), dw2_asm_output_delta(), dw_loc_list_struct::end, addr_table_entry_struct::index, and dw_loc_list_struct::ll_symbol.

static HOST_WIDE_INT ceiling ( HOST_WIDE_INT  ,
unsigned  int 
)
static
static HOST_WIDE_INT ceiling ( )
inlinestatic
   Given a value, round it up to the lowest multiple of `boundary'
   which is not less than the value itself.  
static void change_AT_die_ref ( )
inlinestatic
   Change DIE reference REF to point to NEW_DIE instead.  

Referenced by remove_child_or_replace_with_skeleton().

static int check_duplicate_cu ( )
static
   Check whether we have already seen this CU and set up SYM_NUM
   accordingly.  
static void checksum_die_context ( dw_die_ref  ,
struct md5_ctx *   
)
static
static void checksum_die_context ( )
static
   Checksum the context of the DIE.  This adds the names of any
   surrounding namespaces or structures to the checksum.  
static void checksum_sleb128 ( HOST_WIDE_INT  ,
struct md5_ctx *   
)
static
static void checksum_sleb128 ( )
static
   Calculate the checksum of a number in signed LEB128 format.  
static void checksum_uleb128 ( unsigned  HOST_WIDE_INT,
struct md5_ctx *   
)
static
static void checksum_uleb128 ( )
static
   Calculate the checksum of a number in unsigned LEB128 format.  
           More bytes to follow.  
static int class_or_namespace_scope_p ( dw_die_ref  )
inlinestatic

Referenced by gen_array_type_die().

static int class_or_namespace_scope_p ( )
inlinestatic
   Returns nonzero if CONTEXT_DIE is a class or namespace, for deciding
   whether or not to treat a DIE in this context as a declaration.  
static int class_scope_p ( dw_die_ref  )
inlinestatic
static int class_scope_p ( )
inlinestatic
   Returns nonzero if CONTEXT_DIE is a class.  
static dw_die_ref clone_as_declaration ( dw_die_ref  )
static
static dw_die_ref clone_as_declaration ( )
static
   Make a clone of DIE as a declaration.  
     If the DIE is already a declaration, just clone it.  
     If the DIE is a specification, just clone its declaration DIE.  
         We don't want to copy over all attributes.
         For example we don't want DW_AT_byte_size because otherwise we will no
         longer have a declaration and GDB will treat it as a definition.  
static dw_die_ref clone_die ( dw_die_ref  )
static
static dw_die_ref clone_die ( )
static
   Make a clone of DIE.  
static dw_die_ref clone_tree ( dw_die_ref  )
static

Referenced by is_comdat_die().

static dw_die_ref clone_tree ( )
static
   Make a clone of the tree rooted at DIE.  

References clone_die(), hash_table< Descriptor, Allocator >::find_slot_with_hash(), and decl_table_entry::orig.

static dw_die_ref clone_tree_hash ( )
static
   Like clone_tree, but additionally enter all the children into
   the hash table decl_table.  
     Assert that DIE isn't in the hash table yet.  If it would be there
     before, the ancestors would be necessarily there as well, therefore
     clone_tree_hash wouldn't be called.  

References AT_loc(), constant_size(), size_of_locs(), and size_of_uleb128().

static dw_loc_descr_ref clz_loc_descriptor ( rtx  rtl,
enum machine_mode  mode,
enum machine_mode  mem_mode 
)
static
   CLZ (where constV is CLZ_DEFINED_VALUE_AT_ZERO computed value,
   const0 is DW_OP_lit0 or corresponding typed constant,
   const1 is DW_OP_lit1 or corresponding typed constant
   and constMSB is constant with just the MSB bit set
   for the mode):
       DW_OP_dup DW_OP_bra <L1> DW_OP_drop constV DW_OP_skip <L4>
   L1: const0 DW_OP_swap
   L2: DW_OP_dup constMSB DW_OP_and DW_OP_bra <L3> const1 DW_OP_shl
       DW_OP_swap DW_OP_plus_uconst <1> DW_OP_swap DW_OP_skip <L2>
   L3: DW_OP_drop
   L4: DW_OP_nop

   CTZ is similar:
       DW_OP_dup DW_OP_bra <L1> DW_OP_drop constV DW_OP_skip <L4>
   L1: const0 DW_OP_swap
   L2: DW_OP_dup const1 DW_OP_and DW_OP_bra <L3> const1 DW_OP_shr
       DW_OP_swap DW_OP_plus_uconst <1> DW_OP_swap DW_OP_skip <L2>
   L3: DW_OP_drop
   L4: DW_OP_nop

   FFS is similar:
       DW_OP_dup DW_OP_bra <L1> DW_OP_drop const0 DW_OP_skip <L4>
   L1: const1 DW_OP_swap
   L2: DW_OP_dup const1 DW_OP_and DW_OP_bra <L3> const1 DW_OP_shr
       DW_OP_swap DW_OP_plus_uconst <1> DW_OP_swap DW_OP_skip <L2>
   L3: DW_OP_drop
   L4: DW_OP_nop  
static void collect_checksum_attributes ( struct checksum_attributes ,
dw_die_ref   
)
static
static void collect_checksum_attributes ( )
static
   Collect the attributes that we will want to use for the checksum.  
static int common_block_die_table_eq ( const void *  ,
const void *   
)
static
static int common_block_die_table_eq ( )
static
   Return nonzero if decl_id and die_parent of die_struct X is the same
   as decl_id and die_parent of die_struct Y.  
static hashval_t common_block_die_table_hash ( const void *  )
static
static hashval_t common_block_die_table_hash ( )
static
   Returns a hash value for X (which really is a die_struct).  
static const char * comp_dir_string ( )
static
   Retrieve the comp_dir string suitable for use with DW_AT_comp_dir.  
static dw_die_ref comp_unit_die ( )
static
static dw_loc_descr_ref compare_loc_descriptor ( enum dwarf_location_atom  op,
dw_loc_descr_ref  op0,
dw_loc_descr_ref  op1 
)
static
   Return location descriptor for comparison OP with operands OP0 and OP1.  

Referenced by reg_loc_descriptor().

static bool compare_loc_operands ( )
inlinestatic
   Return true if X and Y opcodes have the same operands.  
         FALLTHRU 
         If splitting debug info, the use of DW_OP_GNU_addr_index
        can cause irrelevant differences in dw_loc_addr.  
         Other codes have no operands.  

Referenced by prune_unused_types_walk_local_classes().

static bool compare_locs ( )
inlinestatic
   Return true if DWARF location expressions X and Y are the same.  
static void compute_frame_pointer_to_fb_displacement ( )
static
   Compute a displacement from the "steady-state frame pointer" to the
   frame base (often the same as the CFA), and store it in
   frame_pointer_fb_offset.  OFFSET is added to the displacement
   before the latter is negated.  
     ??? AVR doesn't set up valid eliminations when there is no stack frame
     in which to eliminate.  This is because it's stack pointer isn't 
     directly accessible as a register within the ISA.  To work around
     this, assume that while we cannot provide a proper value for
     frame_pointer_fb_offset, we won't need one either.  
static void compute_section_prefix ( dw_die_ref  )
static
static void compute_section_prefix ( )
static
   Calculate the MD5 checksum of the compilation unit DIE UNIT_DIE and its
   children, and set comdat_symbol_id accordingly.  
     Compute the checksum of the DIE, then append part of it as hex digits to
     the name filename of the unit.  

References contains_subprogram_definition(), die_struct::die_tag, and is_declaration_die().

static dw_loc_descr_ref concat_loc_descriptor ( rtx  ,
rtx  ,
enum  var_init_status 
)
static
static dw_loc_descr_ref concat_loc_descriptor ( )
static
   Return a descriptor that describes the concatenation of two locations.
   This is typically a complex variable.  

References dw_loc_list_1(), and var_loc_node::loc.

static dw_loc_descr_ref concatn_loc_descriptor ( )
static
   Return a descriptor that describes the concatenation of N
   locations.  
static bool const_ok_for_output ( )
static
   Return true if constant RTL can be emitted in DW_OP_addr or
   DW_AT_const_value.  TLS SYMBOL_REFs, external SYMBOL_REFs or
   non-marked constant pool SYMBOL_REFs can't be referenced in it.  
static int const_ok_for_output_1 ( )
static
   Helper function for const_ok_for_output, called either directly
   or via for_each_rtx.  
         If delegitimize_address couldn't do anything with the UNSPEC, assume
         we can't express it in the debug info.  
         Don't complain about TLS UNSPECs, those are just too hard to
         delegitimize.  Note this could be a non-decl SYMBOL_REF such as
         one in a constant pool entry, so testing SYMBOL_REF_TLS_MODEL
         rather than DECL_THREAD_LOCAL_P is not just an optimization.  
         If all references to this pool constant were optimized away,
         it was not output and thus we can't represent it.  
     Avoid references to external symbols in debug info, on several targets
     the linker might even refuse to link when linking a shared library,
     and in many other cases the relocations for .debug_info/.debug_loc are
     dropped, so the address becomes zero anyway.  Hidden symbols, guaranteed
     to be defined within the same shared library or executable are fine.  
static int constant_size ( unsigned  HOST_WIDE_INT)
static

Referenced by clone_tree_hash(), and size_of_aranges().

static int constant_size ( )
static
   Return the power-of-two number of bytes necessary to represent VALUE.  
static rtx construct_piece_list ( rtx  loc_note,
HOST_WIDE_INT  bitpos,
HOST_WIDE_INT  bitsize 
)
static
static int contains_subprogram_definition ( )
static
   Return non-zero if this DIE contains a defining declaration of a
   subprogram.  

References add_child_die(), and remove_child_with_prev().

Referenced by compute_section_prefix().

static dw_loc_list_ref convert_cfa_to_fb_loc_list ( )
static
   Convert the CFI instructions for the current function into a
   location list.  This is used for DW_AT_frame_base when we targeting
   a dwarf2 consumer that does not support the dwarf3
   DW_OP_call_frame_cfa.  OFFSET is a constant to be added to all CFA
   expressions.  
     ??? Bald assumption that the CIE opcode list does not contain
     advance opcodes.  
         If the first partition contained no CFI adjustments, the
         CIE opcodes apply to the whole first partition.  
             The encoding is complex enough that we should never emit this.  

References die_struct::die_parent, and die_struct::die_tag.

Referenced by record_type_tag().

static dw_loc_descr_ref convert_descriptor_to_mode ( )
static
   For OP descriptor assumed to be in unsigned MODE, convert it to a unsigned
   type matching MODE, or, if MODE is narrower than or as wide as
   DWARF2_ADDR_SIZE, untyped.  Return NULL if the conversion is not
   possible.  

References dw_val_struct::dw_val_struct_union::dw_val_die_union::die, dw_loc_descr_struct::dw_loc_oprnd1, dw_val_class_decl_ref, dw_val_class_die_ref, dw_val_struct::dw_val_struct_union::dw_val_die_union::external, lookup_decl_die(), new_loc_descr(), dw_val_struct::v, dw_val_struct::val_class, dw_val_struct::dw_val_struct_union::val_decl_ref, and dw_val_struct::dw_val_struct_union::val_die_ref.

static dw_die_ref copy_ancestor_tree ( )
static
   Copy DIE and its ancestors, up to, but not including, the compile unit
   or type unit entry, to a new tree.  Adds the new tree to UNIT and returns
   a pointer to the copy of DIE.  If DECL_TABLE is provided, it is used
   to check if the ancestor has already been copied into UNIT.  
         Check if the entry has already been copied to UNIT.  
         Record in DECL_TABLE that DIE has been copied to UNIT.  
         Record the pointer to the copy.  

References copy_decls_walk(), hash_table< Descriptor, Allocator >::create(), decl_table, hash_table< Descriptor, Allocator >::dispose(), mark_dies(), and unmark_dies().

static dw_die_ref copy_declaration_context ( dw_die_ref  ,
dw_die_ref   
)
static

Referenced by is_declaration_die().

static dw_die_ref copy_declaration_context ( )
static
   Copy the declaration context to the new type unit DIE.  This includes
   any surrounding namespace or type declarations.  If the DIE has an
   AT_specification attribute, it also includes attributes and children
   attached to the specification, and returns a pointer to the original
   parent of the declaration DIE.  Returns NULL otherwise.  
         The original DIE will be changed to a declaration, and must
         be moved to be a child of the original declaration DIE.  
         Copy the type node pointer from the new DIE to the original
         declaration DIE so we can forward references later.  
static void copy_decls_for_unworthy_types ( dw_die_ref  )
static
static void copy_decls_for_unworthy_types ( )
static
   Copy declarations for "unworthy" types into the new comdat section.
   Incomplete types, modified types, and certain other types aren't broken
   out into comdat sections of their own, so they don't have a signature,
   and we need to copy the declaration into the same section so that we
   don't have an external reference.  

References calc_die_sizes(), die_struct::die_child, die_struct::die_offset, next_die_offset, and size_of_die().

static void copy_decls_walk ( )
static
   Walk the DIE and its children, looking for references to incomplete
   or trivial types that are unmarked (i.e., that are not in the current
   type_unit).  
                 TARG has already been copied, so we just need to
                 modify the reference to point to the copy.  
                 Record in DECL_TABLE that TARG has been copied.
                 Need to do this now, before the recursive call,
                 because DECL_TABLE may be expanded and SLOT
                 would no longer be a valid pointer.  
                 Make sure the cloned tree is marked as part of the
                 type unit.  
                 If TARG has surrounding context, copy its ancestor tree
                 into the new type unit.  
                 Make sure the newly-copied DIE is walked.  If it was
                 installed in a previously-added context, it won't
                 get visited otherwise.  
                     Find the highest point of the newly-added tree,
                     mark each node along the way, and walk from there.  

Referenced by copy_ancestor_tree().

static dw_loc_descr_ref cst_pool_loc_descr ( )
static
   LOC is constant expression.  Try a luck, look it up in constant
   pool and return its loc_descr of its address.  
     Get an RTL for this, if something has been emitted.  
     TODO: We might get more coverage if we was actually delaying expansion
     of all expressions till end of compilation when constant pools are fully
     populated.  
static unsigned int dbx_reg_number ( const_rtx  )
static
DEBUG_FUNCTION void debug ( )
DEBUG_FUNCTION void debug_dwarf ( void  )
   Print all DWARF information collected for the compilation unit.
   This routine is a debugging aid only.  
DEBUG_FUNCTION void debug_dwarf_die ( )
   Print the information collected for a given DIE.  
static hashval_t debug_str_do_hash ( const void *  )
static

Referenced by decl_class_context().

static hashval_t debug_str_do_hash ( )
static
   Hash and equality functions for debug_str_hash.  
static int debug_str_eq ( const void *  ,
const void *   
)
static

Referenced by decl_class_context().

static bool decl_by_reference_p ( )
static
   Return true when DECL_BY_REFERENCE is defined and set for DECL.  

References get_address_mode().

Referenced by add_abstract_origin_attribute().

static tree decl_class_context ( tree  )
static

Referenced by add_type_attribute().

static tree decl_class_context ( )
static
   Get the class to which DECL belongs, if any.  In g++, the DECL_CONTEXT
   of a virtual function may refer to a base class, so we check the 'this'
   parameter.  

References debug_str_do_hash(), debug_str_eq(), and find_AT_string_in_table().

static int decl_die_table_eq ( const void *  ,
const void *   
)
static
static int decl_die_table_eq ( )
static
   Return nonzero if decl_id of die_struct X is the same as UID of decl *Y.  
static hashval_t decl_die_table_hash ( const void *  )
static
static hashval_t decl_die_table_hash ( )
static
   Returns a hash value for X (which really is a die_struct).  

References adjust_piece_list().

static int decl_loc_table_eq ( const void *  ,
const void *   
)
static
static int decl_loc_table_eq ( )
static
   Return nonzero if decl_id of var_loc_list X is the same as
   UID of decl *Y.  
static hashval_t decl_loc_table_hash ( const void *  )
static
static hashval_t decl_loc_table_hash ( )
static
   Returns a hash value for X (which really is a var_loc_list).  
static int decl_piece_bitsize ( )
static
   Return how many bits covers PIECE EXPR_LIST.  

Referenced by lookup_type_die_strip_naming_typedef(), and remove_child_TAG().

static rtx decl_piece_node ( )
static
   Create an EXPR_LIST for location note LOC_NOTE covering BITSIZE bits.
   Next is the chain of following piece nodes.  

Referenced by remove_child_TAG().

static rtx* decl_piece_varloc_ptr ( )
static
   Return pointer to the location of location note in PIECE EXPR_LIST.  

References die_struct::die_abbrev, die_struct::die_offset, die_struct::die_tag, dwarf_tag_name(), and print_spaces().

Referenced by remove_child_TAG().

static const char* decl_start_label ( tree  )
static
static const char* decl_start_label ( )
static
   Get the decl's label, as described by its RTL. This may be different
   from the DECL_NAME name used in the source file.  
static tree decl_ultimate_origin ( const_tree  )
static
static tree decl_ultimate_origin ( )
static
   Determine the "ultimate origin" of a decl.  The decl may be an inlined
   instance of an inlined instance of a decl which is local to an inline
   function, so we have to trace all of the way back through the origin chain
   to find out what sort of node actually served as the original seed for the
   given block.  
     output_inline_function sets DECL_ABSTRACT_ORIGIN for all the
     nodes in the function to point to themselves; ignore that if
     we're trying to output the abstract instance of this function.  
     Since the DECL_ABSTRACT_ORIGIN for a DECL is supposed to be the
     most distant ancestor, this should never happen.  
static dw_die_ref declare_in_namespace ( tree  ,
dw_die_ref   
)
static
static dw_die_ref declare_in_namespace ( )
static
   Emit a declaration DIE for THING (which is either a DECL or a tagged
   type) within its namespace, if appropriate.

   For compatibility with older debuggers, namespace DIEs only contain
   declarations; all definitions are emitted at CU scope.  
     If this decl is from an inlined function, then don't try to emit it in its
     namespace, as we will get confused.  It would have already been emitted
     when the abstract instance of the inline function was emitted anyways.  

References var_loc_list_def::first, first_loclabel_num_not_at_text_label, have_multiple_function_sections, var_loc_node::label, and var_loc_node::next.

static void decls_for_scope ( tree  ,
dw_die_ref  ,
int   
)
static
static void decls_for_scope ( )
static
   Generate all of the decls declared within a given scope and (recursively)
   all of its sub-blocks.  
     Ignore NULL blocks.  
     Output the DIEs to represent all of the data objects and typedefs
     declared directly within this block but not within any nested
     sub-blocks.  Also, nested function and tag DIEs have been
     generated with a parent of NULL; fix that up now.  
     If we're at -g1, we're not interested in subblocks.  
     Output the DIEs to represent all sub-blocks (and the items declared
     therein) of this block.  

References asm_noperands(), get_attr_min_length(), have_multiple_function_sections, and previous_insn().

static void defer_location ( )
static
   Add VARIABLE and DIE into deferred locations list.  
static dw_loc_descr_ref descr_info_loc ( )
static
static void die_checksum ( dw_die_ref  ,
struct md5_ctx *  ,
int *   
)
static
static void die_checksum ( )
static
   Calculate the checksum of a DIE.  
     To avoid infinite recursion.  
static void die_checksum_ordered ( dw_die_ref  ,
struct md5_ctx *  ,
int *   
)
static
static void die_checksum_ordered ( )
static
   Calculate the checksum of a DIE, using an ordered subset of attributes.  
     Checksum the child DIEs.  
           Ignore instantiations of member type and function templates.  
           Use a shallow checksum for named nested types and member
           functions.  
           Use a deep checksum for other children.  
           Mark this DIE so it gets processed when unmarking.  
static void die_odr_checksum ( )
static
   Add a type name and tag to a hash.  

References die_struct::die_tag.

static double_int double_int_type_size_in_bits ( )
inlinestatic
   Similarly, but return a double_int instead of UHWI.  
static int dump_struct_debug ( tree  type,
enum debug_info_usage  usage,
enum debug_struct_file  criterion,
int  generic,
int  matches,
int  result 
)
static
static enum dwarf_location_atom dw_addr_op ( )
inlinestatic
   Return the operator to use for an address of a variable.  For dtprel_true, we
   use DW_OP_const*.  For regular variables, which need both link-time
   relocation and consumer-level relocation (e.g., to account for shared objects
   loaded at a random address), we use DW_OP_addr*.  

References gen_compile_unit_die(), and single_comp_unit_die.

enum dw_cfi_oprnd_type dw_cfi_oprnd1_desc ( )
   Describe for the GTY machinery what parts of dw_cfi_oprnd1 are used.  
enum dw_cfi_oprnd_type dw_cfi_oprnd2_desc ( )
   Describe for the GTY machinery what parts of dw_cfi_oprnd2 are used.  

References targetm.

static dw_loc_list_ref dw_loc_list ( )
static
   Return the dwarf representation of the location list LOC_LIST of
   DECL.  WANT_ADDRESS has the same meaning as in loc_list_from_tree
   function.  
     Now that we know what section we are using for a base,
     actually construct the list of locations.
     The first location information is what is passed to the
     function that creates the location list, and the remaining
     locations just get added on to that list.
     Note that we only know the start address for a location
     (IE location changes), so to build the range, we use
     the range [current location start, next location start].
     This means we have to special case the last node, and generate
     a range of [last location start, end of function label].  
               This requires DW_OP_{,bit_}piece, which is not usable
               inside DWARF expressions.  
               If section switch happens in between node->label
               and node->next->label (or end of function) and
               we can't emit it as a single entry list,
               emit two ranges, first one ending at the end
               of first partition and second one starting at the
               beginning of second partition.  
               The variable has a location between NODE->LABEL and
               NODE->NEXT->LABEL.  
               If the variable has a location at the last label
               it keeps its location until the end of function.  
                   The variable has a location between NODE->LABEL and
                   NODE->NEXT->LABEL.  
     Try to avoid the overhead of a location list emitting a location
     expression instead, but only if we didn't have more than one
     location entry in the first place.  If some entries were not
     representable, we don't want to pretend a single entry that was
     applies to the entire scope in which the variable is
     available.  
static dw_loc_descr_ref dw_loc_list_1 ( tree  loc,
rtx  varloc,
int  want_address,
enum var_init_status  initialized 
)
static
   Helper function for dw_loc_list.  Compute proper Dwarf location descriptor
   for VARLOC.  
         Single part.  
     Show if we can't fill the request for an address.  
     If we've got an address and don't want one, dereference.  

Referenced by concat_loc_descriptor().

static dw_loc_descr_ref dw_sra_loc_expr ( )
static
   Helper function for dw_loc_list.  Compute proper Dwarf location descriptor
   for VAR_LOC_NOTE for variable DECL that has been optimized by SRA.  
         Check that cur_descr either doesn't use
         DW_OP_*piece operations, or their sum is equal
         to bitsize.  Otherwise we can't embed it.  
             Discard the current piece of the descriptor and release any
             addr_table entries it uses.  
         If there is a hole, add DW_OP_*piece after empty DWARF
         expression, which means that those bits are optimized out.  
             DW_OP_bit_size offset should be zero for register
             or implicit location descriptions and empty location
             descriptions, but for memory addresses needs big endian
             adjustment.  
     If there were any non-empty expressions, add padding till the end of
     the decl.  
     Discard the descriptor and release any addr_table entries it uses.  

References do_binop().

static bool dw_val_equal_p ( )
static
   Compare two location operands for exact equality.  
         These are all HOST_WIDE_INT, signed or unsigned.  
int dwarf2_build_local_stub ( )
   htab_traverse callback function for optimize_external_refs, below.  SLOT
   points to an external_ref, DATA is the CU we're processing.  If we don't
   already have a local stub, and we have multiple refs, build a stub.  
         We have multiple references to this type, so build a small stub.
         Both of these forms are a bit dodgy from the perspective of the
         DWARF standard, since technically they should have names.  
             If we refer to this type via sig8, use AT_signature.  
             Otherwise, use a typedef with no name.  

Referenced by generate_skeleton().

static const char* dwarf2_name ( tree  ,
int   
)
static
static const char* dwarf2_name ( )
static
   Return the DWARF2/3 pubname associated with a decl.  
static void dwarf2out_abstract_function ( tree  )
static

Referenced by output_loc_sequence_raw().

static void dwarf2out_abstract_function ( )
static
   Generate the DWARF2 info for the "abstract" instance of a function which we
   may later generate inlined and/or out-of-line instances of.  
     Make sure we have the actual abstract inline, not a clone.  
       We've already generated the abstract instance.  
     We can be called while recursively when seeing block defining inlined subroutine
     DIE.  Be sure to not clobber the outer location table nor use it or we would
     get locations in abstract instantces.  
     Be sure we've emitted the in-class declaration DIE (if any) first, so
     we don't get confused by DECL_ABSTRACT.  
     Pretend we've just finished compiling this function.  
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.  
static void dwarf2out_assembly_start ( )
static
   Called before compile () starts outputtting functions, variables
   and toplevel asms into assembly.  

References dw_vec_struct::array, dw_vec_struct::elt_size, dw_vec_struct::length, dw_val_struct::v, and dw_val_struct::dw_val_struct_union::val_vec.

Referenced by output_loc_sequence_raw().

static void dwarf2out_begin_block ( unsigned  ,
unsigned   
)
static

Referenced by output_loc_sequence_raw().

static void dwarf2out_begin_block ( unsigned int  line,
unsigned int  blocknum 
)
static
   Output a marker (i.e. a label) for the beginning of the generated code for
   a lexical block.  
static void dwarf2out_begin_function ( tree  )
static

Referenced by output_loc_sequence_raw().

static void dwarf2out_begin_function ( )
static
   We need to reset the locations at the beginning of each
   function. We can't do this in the end_function hook, because the
   declarations that use the locations won't have been output when
   that hook is called.  Also compute have_multiple_function_sections here.  

References die_struct::die_child, die_struct::die_mark, die_struct::die_sib, prune_unused_types_prune(), and prune_unused_types_update_strings().

void dwarf2out_begin_prologue ( unsigned int  line,
const char *  file 
)
   Output a marker (i.e. a label) for the beginning of a function, before
   the prologue.  
     ??? current_function_func_begin_label is also used by except.c for
     call-site information.  We must emit this label if it might be used.  
     We can elide the fde allocation if we're not emitting debug info.  
     Cater to the various TARGET_ASM_OUTPUT_MI_THUNK implementations that
     emit insns as rtx but bypass the bulk of rest_of_compilation, which
     would include pass_dwarf2_frame.  If we've not created the FDE yet,
     do so now.  
     Initialize the bits of CURRENT_FDE that were not available earlier.  
     We only want to output line number information for the genuine dwarf2
     prologue case, not the eh frame case.  
         We cannot keep a current personality per function as without CFI
         asm, at the point where we emit the CFI data, there is no current
         function anymore.  

Referenced by output_loc_sequence_raw().

void dwarf2out_decl ( )
   Write the debugging output for DECL.  
         What we would really like to do here is to filter out all mere
         file-scope declarations of file-scope functions which are never
         referenced later within this translation unit (and keep all of ones
         that *are* referenced later on) but we aren't clairvoyant, so we have
         no idea which functions will be referenced in the future (i.e. later
         on within the current translation unit). So here we just ignore all
         file-scope function declarations which are not also definitions.  If
         and when the debugger needs to know something about these functions,
         it will have to hunt around and find the DWARF information associated
         with the definition of the function.

         We can't just check DECL_EXTERNAL to find out which FUNCTION_DECL
         nodes represent definitions and which ones represent mere
         declarations.  We have to check DECL_INITIAL instead. That's because
         the C front-end supports some weird semantics for "extern inline"
         function definitions.  These can get inlined within the current
         translation unit (and thus, we need to generate Dwarf info for their
         abstract instances so that the Dwarf info for the concrete inlined
         instances can have something to refer to) but the compiler never
         generates any out-of-lines instances of such things (despite the fact
         that they *are* definitions).

         The important point is that the C front-end marks these "extern
         inline" functions as DECL_EXTERNAL, but we need to generate DWARF for
         them anyway. Note that the C++ front-end also plays some similar games
         for inline function definitions appearing within include files which
         also contain `#pragma interface' pragmas.

         If we are called from dwarf2out_abstract_function output a DIE
         anyway.  We can end up here this way with early inlining and LTO
         where the inlined function is output in a different LTRANS unit
         or not at all.  
         If we're a nested function, initially use a parent of NULL; if we're
         a plain function, this will be fixed up in decls_for_scope.  If
         we're a method, it will be ignored, since we already have a DIE.  
             But if we're in terse mode, we don't care about scope.  
         Ignore this VAR_DECL if it refers to a file-scope extern data object
         declaration and if the declaration was never even referenced from
         within this entire compilation unit.  We suppress these DIEs in
         order to save space in the .debug section (by eliminating entries
         which are probably useless).  Note that we must not suppress
         block-local extern declarations (whether used or not) because that
         would screw-up the debugger's name lookup mechanism and cause it to
         miss things which really ought to be in scope at a given point.  
         For local statics lookup proper context die.  
         If we are in terse mode, don't generate any DIEs to represent any
         variable declarations or definitions.  
         Don't emit stubs for types unless they are needed by other DIEs.  
         Don't bother trying to generate any DIEs to represent any of the
         normal built-in types for the language we are compiling.  
         If we are in terse mode, don't generate any DIEs for types.  
         If we're a function-scope tag, initially use a parent of NULL;
         this will be fixed up in decls_for_scope.  

References macinfo_struct::code, find_AT_string(), macinfo_struct::info, set_indirect_string(), and strlen().

static void dwarf2out_define ( unsigned int  lineno,
const char *  buffer 
)
static
   Called from debug_define in toplev.c.  The `buffer' parameter contains
   the tail part of the directive line, i.e. the part which is past the
   initial whitespace, #, whitespace, directive-name, whitespace part.  
         Insert a dummy first entry to be able to optimize the whole
         predefined macro block using DW_MACRO_GNU_transparent_include.  

Referenced by output_loc_sequence_raw().

static void dwarf2out_do_cfi_startproc ( )
static
   Emit .cfi_startproc and .cfi_personality/.cfi_lsda if needed.  
         ??? The GAS support isn't entirely consistent.  We have to
         handle indirect support ourselves, but PC-relative is done
         in the assembler.  Further, the assembler can't handle any
         of the weirder relocation types.  
static void dwarf2out_end_block ( unsigned  ,
unsigned   
)
static

Referenced by output_loc_sequence_raw().

static void dwarf2out_end_block ( )
static
   Output a marker (i.e. a label) for the end of the generated code for a
   lexical block.  
void dwarf2out_end_epilogue ( unsigned int  line,
const char *  file 
)
   Output a marker (i.e. a label) for the absolute end of the generated code
   for a function definition.  This gets called *after* the epilogue code has
   been generated.  
     Output a label to mark the endpoint of the code generated for this
     function.  

Referenced by output_loc_sequence_raw().

static void dwarf2out_end_function ( unsigned  int)
static

Referenced by output_loc_sequence_raw().

static void dwarf2out_end_function ( )
static
   Hook called after emitting a function into assembly.
   This does something only for the very first function emitted.  

References prune_unused_types_mark(), prune_unused_types_walk(), comdat_type_struct::root_die, and comdat_type_struct::type_die.

static void dwarf2out_end_source_file ( unsigned  )
static

Referenced by output_loc_sequence_raw().

static void dwarf2out_end_source_file ( )
static
   Record the end of a source file.  
       Record the end of the file for break_out_includes.  
static void dwarf2out_finish ( const char *  )
static

Referenced by output_loc_sequence_raw().

static void dwarf2out_finish ( )
static
   Output stuff that dwarf requires at the end of every file,
   and generate the DWARF-2 debugging info.  
     PCH might result in DW_AT_producer string being restored from the
     header compilation, so always fill it with empty string initially
     and overwrite only here.  
     Add the name for the main input file now.  We delayed this from
     dwarf2out_init to avoid complications with PCH.  
     Traverse the limbo die list, and add parent/child links.  The only
     dies without parents that should be here are concrete instances of
     inline functions, and the comp_unit_die.  We can ignore the comp_unit_die.
     For concrete instances, we can get the parent die from the abstract
     instance.  
               It's OK to be confused by errors in the input.  
                 In certain situations, the lexical block containing a
                 nested function can be optimized away, which results
                 in the nested function die being orphaned.  Likewise
                 with the return type of that nested function.  Force
                 this to be a child of the containing function.

                 It may happen that even the containing function got fully
                 inlined and optimized out.  In that case we are lost and
                 assign the empty child.  This should not be big issue as
                 the function is likely unreachable too.  
         When generating LTO bytecode we can not generate new assembler
         names at this point and all important decls got theirs via
         free-lang-data.  
     Walk through the list of incomplete types again, trying once more to
     emit full debugging info for them.  
     Generate separate COMDAT sections for type DIEs. 
         Each new type_unit DIE was added to the limbo die list when created.
         Since these have all been added to comdat_type_list, clear the
         limbo die list.  
         For each new comdat type unit, copy declarations for incomplete
         types to make the new unit self-contained (i.e., no direct
         references to the main compile unit).  
         In the process of copying declarations from one unit to another,
         we may have left some declarations behind that are no longer
         referenced.  Prune them.  
     Generate separate CUs for each of the include files we've seen.
     They will go into limbo_die_list.  
     Traverse the DIE's and add add sibling attributes to those DIE's
     that have children.  
     When splitting DWARF info, we put some attributes in the
     skeleton compile_unit DIE that remains in the .o, while
     most attributes go in the DWO compile_unit_die.  
     Output a terminator label for the .text section.  
     We can only use the low/high_pc attributes if all of the code was
     in .text.  
         Don't add if the CU has no associated code.  
             We need to give .debug_loc and .debug_ranges an appropriate
             "base address".  Use zero so that these addresses become
             absolute.  Historically, we've emitted the unexpected
             DW_AT_entry_pc instead of DW_AT_low_pc for this purpose.
             Emit both to give time for other tools to adapt.  
         optimize_location_lists calculates the size of the lists,
         so index them first, and assign indices to the entries.
         Although optimize_location_lists will remove entries from
         the table, it only does so for duplicates, and therefore
         only reduces ref_counts to 1.  
         Add attributes common to skeleton compile_units and
         type_units.  Because these attributes include strings, it
         must be done before freezing the string table.  Top-level
         skeleton die attrs are added when the skeleton type unit is
         created, so ensure it is created by this point.  
     Output all of the compilation units.  We put the main one last so that
     the offsets are available to output_pubnames.  
         Don't output duplicate types.  
         Add a pointer to the line table for the main compilation unit
         so that the debugger can make sense of DW_AT_decl_file
         attributes.  
     The AT_pubnames attribute needs to go in all skeleton dies, including
     both the main_cu and all skeleton TUs.  Making this call unconditional
     would end up either adding a second copy of the AT_pubnames attribute, or
     requiring a special case in add_top_level_skeleton_die_attrs.  
         Compute a checksum of the comp_unit to use as the dwo_id.  
         Use the first 8 bytes of the checksum as the dwo_id,
        and add it to both comp-unit DIEs.  
         Add the base offset of the ranges table to the skeleton
        comp-unit DIE.  
     Output the main compilation unit if non-empty or if .debug_macinfo
     or .debug_macro will be emitted.  
     Output the abbreviation table.  
     Output location list section if necessary.  
         Output the location lists info.  
     Output the address range information if a CU (.debug_info section)
     was emitted.  We output an empty table even if we had no functions
     to put in it.  This because the consumer has no way to tell the
     difference between an empty table that we omitted and failure to
     generate a table that would have contained data.  
     Output ranges section if necessary.  
     Have to end the macro section.  
     Output the source line correspondence table.  We must do this
     even if there is no line information.  Otherwise, on an empty
     translation unit, we will generate a present, but empty,
     .debug_info section.  IRIX 6.5 `nm' will then complain when
     examining the file.  This is done late so that any filenames
     used by the debug_info section are marked as 'used'.  
     If we emitted any indirect strings, output the string table too.  
void dwarf2out_frame_finish ( void  )
     Output call frame information.  
     Output another copy for the unwinder.  
static void dwarf2out_function_decl ( tree  )
static

Referenced by output_loc_sequence_raw().

static void dwarf2out_function_decl ( )
static
   Write the debugging output for DECL.  
static void dwarf2out_global_decl ( tree  )
static

Referenced by output_loc_sequence_raw().

static void dwarf2out_global_decl ( )
static
   Output debug information for global decl DECL.  Called from toplev.c after
   compilation proper has finished.  
     Output DWARF2 information for file-scope tentative data object
     declarations, file-scope (extern) function declarations (which
     had no corresponding body) and file-scope tagged type declarations
     and definitions which have not yet been forced out.  
static bool dwarf2out_ignore_block ( const_tree  )
static

Referenced by output_loc_sequence_raw().

static bool dwarf2out_ignore_block ( )
static
   Returns nonzero if it is appropriate not to emit any debugging
   information for BLOCK, because it doesn't contain any instructions.

   Don't allow this for blocks with nested functions or local classes
   as we would end up with orphans, and in the presence of scheduling
   we may end up calling them anyway.  
static void dwarf2out_imported_module_or_decl ( tree  decl,
tree  name,
tree  context,
bool  child 
)
static
   Output debug information for imported module or decl DECL.
   NAME is non-NULL name in context if the decl has been renamed.
   CHILD is true if decl is one of the renamed decls as part of
   importing whole module.  
     dw_die_ref at_import_die;  
     To emit DW_TAG_imported_module or DW_TAG_imported_decl, we need two DIEs.
     We need decl DIE for reference and scope die. First, get DIE for the decl
     itself.  
     Get the scope die for decl context. Use comp_unit_die for global module
     or decl. If die is not found for non globals, force new die.  
     OK, now we have DIEs for decl as well as scope. Emit imported die.  

Referenced by output_loc_sequence_raw().

static void dwarf2out_imported_module_or_decl_1 ( tree  decl,
tree  name,
tree  lexical_block,
dw_die_ref  lexical_block_die 
)
static
   Output debug information for imported module or decl DECL.
   NAME is non-NULL name in the lexical block if the decl has been renamed.
   LEXICAL_BLOCK is the lexical block (which TREE_CODE is a BLOCK)
   that DECL belongs to.
   LEXICAL_BLOCK_DIE is the DIE of LEXICAL_BLOCK.  
         For namespace N { typedef void T; } using N::T; base_type_die
         returns NULL, but DW_TAG_imported_declaration requires
         the DW_AT_import tag.  Force creation of DW_TAG_typedef.  
             If we're trying to avoid duplicate debug info, we may not have
             emitted the member decl for this field.  Emit it now.  

References checksum_uleb128(), macinfo_struct::code, count, first, HOST_WIDE_INT, HOST_WIDE_INT_PRINT_UNSIGNED, macinfo_struct::info, macinfo_struct::lineno, memcpy(), strlen(), and vec_safe_is_empty().

static void dwarf2out_init ( const char *  )
static

Referenced by output_loc_sequence_raw().

static void dwarf2out_init ( )
static
   Set up for Dwarf output at the start of compilation.  
     Allocate the file_table.  
     Allocate the decl_die_table.  
     Allocate the decl_loc_table.  
     Allocate the cached_dw_loc_list_table.  
     Allocate the initial hunk of the decl_scope_table.  
     Allocate the initial hunk of the abbrev_die_table.  
     Zero-th entry is allocated, but unused.  
     Allocate the pubtypes and pubnames vectors.  
         Somewhat confusing detail: The skeleton_[abbrev|info] sections stay in
         the main .o, but the skeleton_line goes into the split off dwo.  
     Make sure the line number table for .text always exists.  

References dw_loc_descr_struct::dw_loc_oprnd1, optimize_location_into_implicit_ptr(), remove_AT(), dw_val_struct::v, and dw_val_struct::dw_val_struct_union::val_addr.

static void dwarf2out_note_section_used ( )
static
   Note that the current function section is being used for code.  

References ate_kind_label, ate_kind_rtx, and ate_kind_rtx_dtprel.

void dwarf2out_set_demangle_name_func ( const char *(*)(const char *)  func)
static void dwarf2out_set_name ( tree  ,
tree   
)
static
static void dwarf2out_set_name ( )
static
   Replace DW_AT_name for the decl with name.  
         replace the string.  
static void dwarf2out_source_line ( unsigned int  line,
const char *  filename,
int  discriminator,
bool  is_stmt 
)
static
@verbatim 

Output Dwarf2 format symbol table information from GCC. Copyright (C) 1992-2013 Free Software Foundation, Inc. Contributed by Gary Funck (gary@.nosp@m.intr.nosp@m.epid..nosp@m.com). Derived from DWARF 1 implementation of Ron Guilmette (rfg@m.nosp@m.onke.nosp@m.ys.co.nosp@m.m). Extensively modified by Jason Merrill (jason.nosp@m.@cyg.nosp@m.nus.c.nosp@m.om).

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/.

   TODO: Emit .debug_line header even when there are no functions, since
           the file numbers are used by .debug_info.  Alternately, leave
           out locations for types and decls.
         Avoid talking about ctors and op= for PODs.
         Factor out common prologue sequences into multiple CIEs.  
   The first part of this file deals with the DWARF 2 frame unwind
   information, which is also used by the GCC efficient exception handling
   mechanism.  The second part, controlled only by an #ifdef
   DWARF2_DEBUGGING_INFO, deals with the other DWARF 2 debugging
   information.  
   DWARF2 Abbreviation Glossary:

   CFA = Canonical Frame Address
           a fixed address on the stack which identifies a call frame.
           We define it to be the value of SP just before the call insn.
           The CFA register and offset, which may change during the course
           of the function, are used to calculate its value at runtime.

   CFI = Call Frame Instruction
           an instruction for the DWARF2 abstract machine

   CIE = Common Information Entry
           information describing information common to one or more FDEs

   DIE = Debugging Information Entry

   FDE = Frame Description Entry
           information describing the stack call frame, in particular,
           how to restore registers

   DW_CFA_... = DWARF2 CFA call frame instruction
   DW_TAG_... = DWARF2 DIE tag 
   Output a label to mark the beginning of a source code line entry
   and record information relating to this source line, in
   'line_info_table' for later output of the .debug_line section.  
   ??? The discriminator parameter ought to be unsigned.  
     The discriminator column was added in dwarf4.  Simplify the below
     by simply removing it if we're not supposed to output it.  
     ??? TODO: Elide duplicate line number entries.  Traditionally,
     the debugger has used the second (possibly duplicate) line number
     at the beginning of the function to mark the end of the prologue.
     We could eliminate any other duplicates within the function.  For
     Dwarf3, we ought to include the DW_LNS_set_prologue_end mark in
     that second line number entry.  
     Recall that this end-of-prologue indication is *not* the same thing
     as the end_prologue debug hook.  The NOTE_INSN_PROLOGUE_END note,
     to which the hook corresponds, follows the last insn that was 
     emitted by gen_prologue.  What we need is to precede the first insn
     that had been emitted after NOTE_INSN_FUNCTION_BEG, i.e. the first
     insn that corresponds to something the user wrote.  These may be
     very different locations once scheduling is enabled.  
     If requested, emit something human-readable.  
         Emit the .loc directive understood by GNU as.  
         "\t.loc %u %u 0 is_stmt %u discriminator %u",
         file_num, line, is_stmt, discriminator 

References dwarf_file_data::filename.

Referenced by output_loc_sequence_raw().

static void dwarf2out_start_source_file ( unsigned  ,
const char *   
)
static

Referenced by output_loc_sequence_raw().

static void dwarf2out_start_source_file ( )
static
   Record the beginning of a new source file.  
         Record the beginning of the file for break_out_includes.  
void dwarf2out_switch_text_section ( void  )
     There is no need to mark used sections when not debugging.  
     Now do the real section switch.  

Referenced by output_loc_sequence_raw().

static void dwarf2out_type_decl ( tree  ,
int   
)
static

Referenced by output_loc_sequence_raw().

static void dwarf2out_type_decl ( )
static
   Output debug information for type decl DECL.  Called from toplev.c
   and from language front ends (to record built-in types).  
static void dwarf2out_undef ( unsigned int  lineno,
const char *  buffer 
)
static
   Called from debug_undef in toplev.c.  The `buffer' parameter contains
   the tail part of the directive line, i.e. the part which is past the
   initial whitespace, #, whitespace, directive-name, whitespace part.  
         Insert a dummy first entry to be able to optimize the whole
         predefined macro block using DW_MACRO_GNU_transparent_include.  

Referenced by output_loc_sequence_raw().

static void dwarf2out_var_location ( rtx  )
static

Referenced by output_loc_sequence_raw().

static void dwarf2out_var_location ( )
static
   Called by the final INSN scan whenever we see a var location.  We
   use it to drop labels in the right places, and throw the location in
   our lookup table.  
     Optimize processing a large consecutive sequence of location
     notes so we don't spend too much time in next_real_insn.  If the
     next insn is another location note, remember the next_real_insn
     calculation for next time.  
     If there are no instructions which would be affected by this note,
     don't do anything.  
     If there were any real insns between note we processed last time
     and this note (or if it is the first note), clear
     last_{,postcall_}label so that they are not reused this time.  
     If there were no real insns between note we processed last time
     and this note, use the label we emitted last time.  Otherwise
     create a new label and emit it.  
         See if loclabel might be equal to .Ltext0.  If yes,
         bump first_loclabel_num_not_at_text_label.  
                   Inline asm could occupy zero bytes.  
                       Assume insn has non-zero length.  

References addr_table_entry_struct::addr, ate_kind_label, ate_kind_rtx, ate_kind_rtx_dtprel, dw2_asm_output_addr(), dw2_asm_output_addr_rtx(), addr_table_entry_struct::index, addr_table_entry_struct::addr_table_entry_struct_union::label, addr_table_entry_struct::addr_table_entry_struct_union::rtl, and targetm.

void dwarf2out_vms_begin_epilogue ( unsigned int  line,
const char *  file 
)
   Output a marker (i.e. a label) for the beginning of the generated code
   for a function epilogue.  This gets called *before* the prologue code has
   been generated.  
     Output a label to mark the endpoint of the code generated for this
     function.  

Referenced by output_loc_sequence_raw().

void dwarf2out_vms_debug_main_pointer ( )
   Output the debug main pointer die for VMS 
     Allocate the VMS debug main subprogram die.  
     Make it the first child of comp_unit_die ().  

References decl_ultimate_origin(), gen_field_die(), gen_subprogram_die(), gen_type_die(), lookup_decl_die(), lookup_type_die_strip_naming_typedef(), member_declared_type(), and push_decl_scope().

void dwarf2out_vms_end_prologue ( unsigned int  line,
const char *  file 
)
   Output a marker (i.e. a label) for the end of the generated code
   for a function prologue.  This gets called *after* the prologue code has
   been generated.  
     Output a label to mark the endpoint of the code generated for this
     function.  

References targetm.

Referenced by output_loc_sequence_raw().

static const char* dwarf_attr_name ( unsigned  )
static
static const char* dwarf_attr_name ( )
static
   Convert a DWARF attribute code into its string name.  
static const char* dwarf_form_name ( unsigned  )
static
static const char* dwarf_form_name ( )
static
   Convert a DWARF value form code into its string name.  
static const char* dwarf_stack_op_name ( )
static
   Convert a DWARF stack opcode into its string name.  
static const char* dwarf_tag_name ( unsigned  )
static
static void equate_decl_number_to_die ( tree  ,
dw_die_ref   
)
static
static void equate_decl_number_to_die ( )
static
   Equate a DIE to a particular declaration.  
static void equate_type_number_to_die ( tree  ,
dw_die_ref   
)
static
static void equate_type_number_to_die ( )
inlinestatic
   Equate a DIE to a given type specifier.  
static void expansion_failed ( )
static
   Output debug info about reason why we failed to expand expression as dwarf
   expression.  

References mem_loc_descriptor(), and VAR_INIT_STATUS_INITIALIZED.

static HOST_WIDE_INT extract_int ( const unsigned char *  ,
unsigned   
)
static
static HOST_WIDE_INT extract_int ( )
static
   Reads integers from dw_vec_const array.  Inverse of insert_int.  
static bool fde_needed_for_eh_p ( )
static
   Return true if frame description entry FDE is needed for EH.  
     If exceptions are enabled, we have collected nothrow info.  

References fde_vec, and dw_fde_struct::uses_eh_lsda.

static HOST_WIDE_INT field_byte_offset ( const_tree  )
static

Referenced by fortran_common().

static HOST_WIDE_INT field_byte_offset ( )
static
   Given a pointer to a FIELD_DECL, compute and return the byte offset of the
   lowest addressed byte of the "containing object" for the given FIELD_DECL,
   or return 0 if we are unable to determine what that offset is, either
   because the argument turns out to be a pointer to an ERROR_MARK node, or
   because the offset is actually variable.  (We can't handle the latter case
   just yet).  
     We cannot yet cope with fields whose positions are variable, so
     for now, when we see such things, we simply return 0.  Someday, we may
     be able to handle such cases, but it will be damn difficult.  
         The size could be unspecified if there was an error, or for
         a flexible array member.  
         If the size of the field is not constant, use the type size.  
         The GCC front-end doesn't make any attempt to keep track of the
         starting bit offset (relative to the start of the containing
         structure type) of the hypothetical "containing object" for a
         bit-field.  Thus, when computing the byte offset value for the
         start of the "containing object" of a bit-field, we must deduce
         this information on our own. This can be rather tricky to do in
         some cases.  For example, handling the following structure type
         definition when compiling for an i386/i486 target (which only
         aligns long long's to 32-bit boundaries) can be very tricky:

         struct S { int field1; long long field2:31; };

         Fortunately, there is a simple rule-of-thumb which can be used
         in such cases.  When compiling for an i386/i486, GCC will
         allocate 8 bytes for the structure shown above.  It decides to
         do this based upon one simple rule for bit-field allocation.
         GCC allocates each "containing object" for each bit-field at
         the first (i.e. lowest addressed) legitimate alignment boundary
         (based upon the required minimum alignment for the declared
         type of the field) which it can possibly use, subject to the
         condition that there is still enough available space remaining
         in the containing object (when allocated at the selected point)
         to fully accommodate all of the bits of the bit-field itself.

         This simple rule makes it obvious why GCC allocates 8 bytes for
         each object of the structure type shown above.  When looking
         for a place to allocate the "containing object" for `field2',
         the compiler simply tries to allocate a 64-bit "containing
         object" at each successive 32-bit boundary (starting at zero)
         until it finds a place to allocate that 64- bit field such that
         at least 31 contiguous (and previously unallocated) bits remain
         within that selected 64 bit field.  (As it turns out, for the
         example above, the compiler finds it is OK to allocate the
         "containing object" 64-bit field at bit-offset zero within the
         structure type.)

         Here we attempt to work backwards from the limited set of facts
         we're given, and we try to deduce from those facts, where GCC
         must have believed that the containing object started (within
         the structure type). The value we deduce is then used (by the
         callers of this routine) to generate DW_AT_location and
         DW_AT_bit_offset attributes for fields (both bit-fields and, in
         the case of DW_AT_location, regular fields as well).  
         Figure out the bit-distance from the start of the structure to
         the "deepest" bit of the bit-field.  
         This is the tricky part.  Use some fancy footwork to deduce
         where the lowest addressed bit of the containing object must
         be.  
         Round up to type_align by default.  This works best for
         bitfields.  
             Round up to decl_align instead.  
static tree field_type ( const_tree  )
static

Referenced by asan_decl_phase_3().

static tree field_type ( )
inlinestatic
   Given a pointer to what is assumed to be a FIELD_DECL node, return a
   pointer to the declared type for the relevant field variable, or return
   `integer_type_node' if the given node turns out to be an
   ERROR_MARK node.  
static int file_info_cmp ( const void *  ,
const void *   
)
static

Referenced by add_pubtype().

static int file_info_cmp ( )
static
   Callback function for file_info comparison.  We sort by looking at
   the directories in the path.  
     Take care of file names without directories.  We need to make sure that
     we return consistent values to qsort since some will get confused if
     we return the same value when identical operands are passed in opposite
     orders.  So if neither has a directory, return 0 and otherwise return
     1 or -1 depending on which one has the directory.  
         Reached the end of the first path?  If so, handle like above.  
         Character of current path component the same?  
static int file_name_acquire ( )
static
   Traversal function for the hash table.  
     Skip all leading "./".  
     Create a new array entry.  
     Search for the file name part.  

Referenced by add_pubtype().

static int file_table_eq ( )
static
   Hash table routines for file_hash.  
static hashval_t file_table_hash ( )
static
static int file_table_relative_p ( )
static
   Set the parameter to true if there are any relative pathnames in
   the file table.  

Referenced by prune_unused_types_prune().

static struct indirect_string_node* find_AT_string ( )
staticread
   Add STR to the indirect string hash table.  

Referenced by dwarf2out_decl().

static struct indirect_string_node* find_AT_string_in_table ( )
staticread
static int find_empty_loc_ranges_at_text_label ( )
static
   Helper function of dwarf2out_end_function, called only after emitting
   the very first function into assembly.  Check if some .debug_loc range
   might end with a .LVL* label that could be equal to .Ltext0.
   In that case we must force using absolute addresses in .debug_loc ranges,
   because this range could be .LVLN-.Ltext0 .. .LVLM-.Ltext0 for
   .LVLN == .LVLM == .Ltext0, thus 0 .. 0, which is a .debug_loc
   list terminator.
   Set have_multiple_function_sections to true in that case and
   terminate htab traversal.  

Referenced by gen_namespace_die().

static enum dwarf_form find_string_form ( )
static
   Find out whether a string should be output inline in DIE
   or out-of-line in .debug_str section.  
     If the string is shorter or equal to the size of the reference, it is
     always better to put it inline.  
     If we cannot expect the linker to merge strings in .debug_str
     section, only put it into .debug_str if it is worth even in this
     single module.  

Referenced by add_AT_unsigned().

static dw_die_ref force_decl_die ( tree  )
static
static dw_die_ref force_decl_die ( )
static
   Returns the DIE for decl.  A DIE will always be returned.  
             Clear current_function_decl, so that gen_subprogram_die thinks
             that this is a declaration. At this point, we just want to force
             declaration die.  
             Set external flag to force declaration die. Restore it after
           gen_decl_die() call.  
               DWARF2 has neither DW_TAG_module, nor DW_TAG_namespace.  
         We should be able to find the DIE now.  
static dw_die_ref force_type_die ( tree  )
static
static dw_die_ref force_type_die ( )
static
   Returns the DIE for TYPE, that must not be a base type.  A DIE is
   always returned.  
static tree fortran_common ( )
static
   Check whether decl is a Fortran COMMON symbol.  If not, NULL_TREE is
   returned.  If so, the decl for the COMMON block is returned, and the
   value is the offset into the common block for the symbol.  
     If the decl isn't a VAR_DECL, or if it isn't static, or if
     it does not have a value (the offset into the common area), or if it
     is thread local (as opposed to global) then it isn't common, and shouldn't
     be handled as such.  

References add_AT_int(), add_AT_unsigned(), bit_position(), field_byte_offset(), host_integerp(), int_bit_position(), simple_type_size_in_bits(), and tree_low_cst().

static void gen_array_type_die ( tree  ,
dw_die_ref   
)
static
static void gen_array_type_die ( )
static
   These routines generate the internal representation of the DIE's for
   the compilation unit.  Debugging information is collected by walking
   the declaration trees passed in from dwarf2out_decl().  
     GNU compilers represent multidimensional array types as sequences of one
     dimensional array types whose element types are themselves array types.
     We sometimes squish that down to a single array_type DIE with multiple
     subscripts in the Dwarf debugging info.  The draft Dwarf specification
     say that we are allowed to do this kind of compression in C, because
     there is no difference between an array of arrays and a multidimensional
     array.  We don't do this for Ada to remain as close as possible to the
     actual representation, which is especially important against the language
     flexibilty wrt arrays of variable size.  
     Emit DW_TAG_string_type for Fortran character types (with kind 1 only, as
     DW_TAG_string_type doesn't have DW_AT_type attribute).  
     For Fortran multidimensional arrays use DW_ORD_col_major ordering.  
     We default the array ordering.  SDB will probably do
     the right things even if DW_AT_ordering is not present.  It's not even
     an issue until we start to get into multidimensional arrays anyway.  If
     SDB is ever caught doing the Wrong Thing for multi-dimensional arrays,
     then we'll have to put the DW_AT_ordering attribute back in.  (But if
     and when we find out that we need to put these in, we will only do so
     for multidimensional arrays.  
         For VECTOR_TYPEs we use an array die with appropriate bounds.  
     Add representation of the type of the elements of this array type and
     emit the corresponding DIE if we haven't done it already.  

References add_abstract_origin_attribute(), add_AT_file(), add_AT_flag(), add_AT_specification(), add_AT_unsigned(), add_child_die(), add_linkage_name(), add_name_and_src_coords_attributes(), add_pubname(), class_or_namespace_scope_p(), current_function_decl, decl_ultimate_origin(), die_struct::die_parent, DINFO_LEVEL_TERSE, expand_location(), force_decl_die(), get_AT(), get_AT_file(), get_AT_flag(), get_AT_unsigned(), is_cu_die(), local_scope_p(), lookup_decl_die(), lookup_filename(), new_die(), premark_used_types(), remove_AT(), and remove_child_TAG().

static void gen_block_die ( tree  ,
dw_die_ref  ,
int   
)
static
static void gen_block_die ( )
static
   Generate a DW_TAG_lexical_block DIE followed by DIEs to represent all of the
   things which are local to the given block.  
     Ignore blocks that are NULL.  
     If the block is one fragment of a non-contiguous block, do not
     process the variables, since they will have been done by the
     origin block.  Do process subblocks.  
     Determine if we need to output any Dwarf DIEs at all to represent this
     block.  
       The outer scopes for inlinings *must* always be represented.  We
       generate DW_TAG_inlined_subroutine DIEs for them.  (See below.) 
         Determine if this block directly contains any "significant"
         local declarations which we will need to output DIEs for.  
           We are not in terse mode so *any* local declaration counts
           as being a "significant" one.  
     It would be a waste of space to generate a Dwarf DW_TAG_lexical_block
     DIE for any block which contains no significant local declarations at
     all.  Rather, in such cases we just call `decls_for_scope' so that any
     needed Dwarf info for any sub-blocks will get properly generated. Note
     that in terse mode, our definition of what constitutes a "significant"
     local declaration gets restricted to include only inlined function
     instances and local (nested) function definitions.  
             If STMT block is abstract, that means we have been called
             indirectly from dwarf2out_abstract_function.
             That function rightfully marks the descendent blocks (of
             the abstract function it is dealing with) as being abstract,
             precisely to prevent us from emitting any
             DW_TAG_inlined_subroutine DIE as a descendent
             of an abstract function instance. So in that case, we should
             not call gen_inlined_subroutine_die.

             Later though, when cgraph asks dwarf2out to emit info
             for the concrete instance of the function decl into which
             the concrete instance of STMT got inlined, the later will lead
             to the generation of a DW_TAG_inlined_subroutine DIE.  
static dw_die_ref gen_call_site_die ( tree  decl,
dw_die_ref  subr_die,
struct call_arg_loc_node ca_loc 
)
static
   Generate a DW_TAG_GNU_call_site DIE in function DECL under SUBR_DIE
   for CA_LOC call arg loc node.  

References add_AT_lbl_id().

static dw_die_ref gen_compile_unit_die ( const char *  )
static

Referenced by dw_addr_op().

static dw_die_ref gen_compile_unit_die ( )
static
   Generate the DIE for the compilation unit.  
         Don't add cwd for <built-in>.  
     If our producer is LTO try to figure out a common language to use
     from the global list of translation units.  
               Mixing C and C++ is ok, use C++ in that case.  
                 Fall back to C.  
     Use a degraded Fortran setting in strict DWARF2 so is_fortran works.  
         Fortran has case insensitive identifiers and the front-end
         lowercases everything.  
         The default DW_ID_case_sensitive doesn't need to be specified.  
static void gen_const_die ( tree  ,
dw_die_ref   
)
static
static void gen_const_die ( )
static
   Generate a DIE to represent a named constant.  

References DINFO_USAGE_DIR_USE, and gen_type_die_with_usage().

static dw_die_ref gen_decl_die ( tree  ,
tree  ,
dw_die_ref   
)
static
static dw_die_ref gen_decl_die ( )
static
   Generate Dwarf debug information for a decl described by DECL.
   The return value is currently only meaningful for PARM_DECLs,
   for all other decls it returns NULL.  
             The individual enumerators of an enum type get output when we output
             the Dwarf representation of the relevant enum type itself.  
         Emit its type.  
         And its containing namespace.  
         Don't output any DIEs to represent mere function declarations,
         unless they are class members or explicit block externs.  
         FIXME 
         This doesn't work because the C frontend sets DECL_ABSTRACT_ORIGIN
         on local redeclarations of global functions.  That seems broken.  
           This is only a declaration.  
         If we're emitting a clone, emit info for the abstract instance.  
         If we're emitting an out-of-line copy of an inline function,
         emit info for the abstract instance and set up to refer to it.  
                  dwarf2out_abstract_function won't emit a die if this is just
                  a declaration.  We must avoid setting DECL_ABSTRACT_ORIGIN in
                  that case, because that works only if we have a die.  
         Otherwise we're emitting the primary DIE for this decl.  
             Before we describe the FUNCTION_DECL itself, make sure that we
             have its containing type.  
             And its return type.  
             And its virtual context.  
             Make sure we have a member DIE for decl.  
             And its containing namespace.  
         Now output a DIE to represent the function itself.  
         If we are in terse mode, don't generate any DIEs to represent any
         actual typedefs.  
         In the special case of a TYPE_DECL node representing the declaration
         of some type tag, if the given TYPE_DECL is marked as having been
         instantiated from some other (original) TYPE_DECL node (e.g. one which
         was generated within the original definition of an inline function) we
         used to generate a special (abbreviated) DW_TAG_structure_type,
         DW_TAG_union_type, or DW_TAG_enumeration_type DIE here.  But nothing
         should be actually referencing those DIEs, as variable DIEs with that
         type would be emitted already in the abstract origin, so it was always
         removed during unused type prunning.  Don't add anything in this
         case.  
           Output a DIE to represent the typedef itself.  
         If we are in terse mode, don't generate any DIEs to represent any
         variable declarations or definitions.  
         Output any DIEs that are needed to specify the type of this data
         object.  
         And its containing type.  
         And its containing namespace.  
         Now output the DIE to represent the data object itself.  This gets
         complicated because of the possibility that the VAR_DECL really
         represents an inlined instance of a formal parameter for an inline
         function.  
         Ignore the nameless fields that are used to skip bits but handle C++
         anonymous unions and structs.  
         Probably some frontend-internal decl.  Assume we don't care.  
static void gen_descr_array_type_die ( tree  type,
struct array_descr_info info,
dw_die_ref  context_die 
)
static
   This routine generates DIE for array with hidden descriptor, details
   are filled into *info by a langhook.  
     For Fortran multidimensional arrays use DW_ORD_col_major ordering.  
             If it is the default value, omit it.  

References add_AT_vms_delta(), dw_fde_struct::dw_fde_begin, dw_fde_struct::dw_fde_vms_begin_epilogue, and dw_fde_struct::dw_fde_vms_end_prologue.

static void gen_entry_point_die ( tree  ,
dw_die_ref   
)
static
static void gen_entry_point_die ( )
static
static dw_die_ref gen_enumeration_type_die ( tree  ,
dw_die_ref   
)
static
static dw_die_ref gen_enumeration_type_die ( )
static
   Generate a DIE to represent an enumeration type.  Note that these DIEs
   include all of the information about the enumeration values also. Each
   enumerated type name/value is listed as a child of the enumerated type
   DIE.  
     Handle a GNU C/C++ extension, i.e. incomplete enum types.  If the
     given enum type is incomplete, do not generate the DW_AT_byte_size
     attribute or the DW_AT_element_list attribute.  
         If the first reference to this type was as the return type of an
         inline function, then it may not have a parent.  Fix this now.  
               DWARF2 does not provide a way of indicating whether or
               not enumeration constants are signed or unsigned.  GDB
               always assumes the values are signed, so we output all
               values as if they were signed.  That means that
               enumeration constants with very large unsigned values
               will appear to have negative values in the debugger.

               TODO: the above comment is wrong, DWARF2 does provide
               DW_FORM_sdata/DW_FORM_udata to represent signed/unsigned data.
               This should be re-worked to use correct signed/unsigned
               int/double tags for all cases, instead of always treating as
               signed.  
               Enumeration constants may be wider than HOST_WIDE_INT.  Handle
               that here.  
static void gen_field_die ( tree  ,
dw_die_ref   
)
static
static void gen_field_die ( )
static
   Generate a DIE for a field in a record, or structure.  
     Equate decl number to die, so that we can look up this decl later on.  
static dw_die_ref gen_formal_parameter_die ( tree  node,
tree  origin,
bool  emit_name_p,
dw_die_ref  context_die 
)
static
   Generate a DIE to represent either a real live formal parameter decl or to
   represent just the type of some formal parameter position in some function
   type.

   Note that this routine is a bit unusual because its argument may be a
   ..._DECL node (i.e. either a PARM_DECL or perhaps a VAR_DECL which
   represents an inlining of some PARM_DECL) or else some sort of a ..._TYPE
   node.  If it's the former then this function is being called to output a
   DIE to represent a formal parameter object (or some inlining thereof).  If
   it's the latter, then this function is only being called to output a
   DW_TAG_formal_parameter DIE to stand as a placeholder for some formal
   argument type of some subprogram type.
   If EMIT_NAME_P is true, name and source coordinate attributes
   are emitted.  
         We were called with some kind of a ..._TYPE node.  

References call_arg_loc_node::call_arg_loc_note, get_address_mode(), lookup_decl_die(), mem_loc_descriptor(), pc_rtx, reg_loc_descriptor(), call_arg_loc_node::symbol_ref, and VAR_INIT_STATUS_INITIALIZED.

static dw_die_ref gen_formal_parameter_pack_die ( tree  parm_pack,
tree  pack_arg,
dw_die_ref  subr_die,
tree next_arg 
)
static
   Generate and return a DW_TAG_GNU_formal_parameter_pack. Also generate
   children DW_TAG_formal_parameter DIEs representing the arguments of the
   parameter pack.

   PARM_PACK must be a function parameter pack.
   PACK_ARG is the first argument of the parameter pack. Its TREE_CHAIN
   must point to the subsequent arguments of the function PACK_ARG belongs to.
   SUBR_DIE is the DIE of the function PACK_ARG belongs to.
   If NEXT_ARG is non NULL, *NEXT_ARG is set to the function argument
   following the last one for which a DIE was generated.  
static void gen_formal_types_die ( tree  ,
dw_die_ref   
)
static
static void gen_formal_types_die ( )
static
   Generate a list of nameless DW_TAG_formal_parameter DIEs (and perhaps a
   DW_TAG_unspecified_parameters DIE) to represent the types of the formal
   parameters as specified in some function type specification (except for
   those which appear as part of a function *definition*).  
     Make our first pass over the list of formal parameter types and output a
     DW_TAG_formal_parameter DIE for each one.  
         Output a (nameless) DIE to represent the formal parameter itself.  
     If this function type has an ellipsis, add a
     DW_TAG_unspecified_parameters DIE to the end of the parameter list.  
     Make our second (and final) pass over the list of formal parameter types
     and output DIEs to represent those types (as necessary).  
static void gen_generic_params_dies ( tree  )
static
static void gen_generic_params_dies ( )
static
   Generate DIEs for the generic parameters of T.
   T must be either a generic type or a generic function.
   See http://gcc.gnu.org/wiki/TemplateParmsDwarf for more.  
       T has no generic parameter. It means T is neither a generic type
       or function. End of story.  
             If PARM represents a template parameter pack,
             emit a DW_TAG_GNU_template_parameter_pack DIE, followed
             by DW_TAG_template_*_parameter DIEs for the argument
             pack elements of ARG. Note that ARG would then be
             an argument pack.  

References new_loc_descr().

static void gen_inheritance_die ( tree  ,
tree  ,
dw_die_ref   
)
static
static void gen_inheritance_die ( )
static
   Generate the DIE for a base class.  
     In DWARF3+ the default is DW_ACCESS_private only in DW_TAG_class_type
     children, otherwise the default is DW_ACCESS_public.  In DWARF2
     the default has always been DW_ACCESS_private.  
static void gen_inlined_subroutine_die ( tree  ,
dw_die_ref  ,
int   
)
static
static void gen_inlined_subroutine_die ( )
static
   Generate a DIE for an inlined subprogram.  
     The instance of function that is effectively being inlined shall not
     be abstract.  
     Emit info for the abstract instance first, if we haven't yet.  We
     must emit this even if the block is abstract, otherwise when we
     emit the block below (or elsewhere), we may end up trying to emit
     a die whose origin die hasn't been emitted, and crashing.  

References comp_unit_die(), force_decl_die(), force_type_die(), and strip_naming_typedef().

static char* gen_internal_sym ( const char *  )
static
static char* gen_internal_sym ( )
static
static void gen_label_die ( tree  ,
dw_die_ref   
)
static
static void gen_label_die ( )
static
   Generate a DIE to represent a label identifier.  
         Deleted labels are programmer specified labels which have been
         eliminated because of various optimizations.  We still emit them
         here so that it is possible to put breakpoints on them.  
             When optimization is enabled (via -O) some parts of the compiler
             (e.g. jump.c and cse.c) may try to delete CODE_LABEL insns which
             represent source-level labels which were explicitly declared by
             the user.  This really shouldn't be happening though, so catch
             it if it ever does happen.  
static void gen_lexical_block_die ( tree  ,
dw_die_ref  ,
int   
)
static
static void gen_lexical_block_die ( )
static
   Generate a DIE for a lexical block.  
static void gen_llsym ( )
inlinestatic
   Generate a new internal symbol for this location list node, if it
   hasn't got one yet.  

References targetm.

static void gen_member_die ( tree  ,
dw_die_ref   
)
static
static void gen_member_die ( )
static
   Generate a DIE for a class member.  
     If this is not an incomplete type, output descriptions of each of its
     members. Note that as we output the DIEs necessary to represent the
     members of this record or union type, we will also be trying to output
     DIEs to represent the *types* of those members. However the `type'
     function (above) will specifically avoid generating type DIEs for member
     types *within* the list of member DIEs for this (containing) type except
     for those types (of members) which are explicitly marked as also being
     members of this (containing) type themselves.  The g++ front- end can
     force any given type to be treated as a member of some other (containing)
     type by setting the TYPE_CONTEXT of the given (member) type to point to
     the TREE node representing the appropriate (containing) type.  
     First output info about the base classes.  
     Now output info about the data members and type members.  
         If we thought we were generating minimal debug info for TYPE
         and then changed our minds, some of the member declarations
         may have already been defined.  Don't define them again, but
         do put them in the right order.  
     Now output info about the function members (if any).  
         Don't include clones in the member list.  

References gen_field_die(), gen_type_die(), and member_declared_type().

static void gen_namespace_die ( tree  ,
dw_die_ref   
)
static
static void gen_namespace_die ( )
static
   Generate a DIE for a namespace or namespace alias.  
     Namespace aliases have a DECL_ABSTRACT_ORIGIN of the namespace
     they are an alias of.  
         Output a real namespace or module.  
         For Fortran modules defined in different CU don't add src coords.  
         Output a namespace alias.  
         Force out the namespace we are an alias of, if necessary.  
         Now create the namespace alias DIE.  
     Bypass dwarf2_name's check for DECL_NAMELESS.  

References decl_loc_table, find_empty_loc_ranges_at_text_label(), and have_multiple_function_sections.

static void gen_pointer_type_die ( )
static
   Don't generate either pointer_type DIEs or reference_type DIEs here.
   Use modified_type_die instead.
   We keep this code here just in case these types of DIEs may be needed to
   represent certain things in other languages (e.g. Pascal) someday.  
static char* gen_producer_string ( )
static
   Return a heap allocated producer string including command line options
   if -grecord-gcc-switches.  
           Ignore these.  
static void gen_ptr_to_mbr_type_die ( tree  ,
dw_die_ref   
)
static
static void gen_ptr_to_mbr_type_die ( )
static
   Generate a DIE for a pointer to a member type.  

References DINFO_LEVEL_TERSE.

static void gen_reference_type_die ( )
static
   Don't generate either pointer_type DIEs or reference_type DIEs here.
   Use modified_type_die instead.
   We keep this code here just in case these types of DIEs may be needed to
   represent certain things in other languages (e.g. Pascal) someday.  

References force_decl_die().

static void gen_remaining_tmpl_value_param_die_attribute ( )
static
   Add a DW_AT_const_value attribute to DIEs that were scheduled
   by append_entry_to_tmpl_value_parm_die_table. This function must
   be called after function DIEs have been generated.  
static void gen_scheduled_generic_parms_dies ( )
static
   Generate generic parameters DIEs for instances of generic types
   that have been previously scheduled by
   schedule_generic_params_dies_gen. This function must be called
   after all the types of the CU have been laid out.  
static void gen_struct_or_union_type_die ( tree  type,
dw_die_ref  context_die,
enum debug_info_usage  usage 
)
static
   Generate a DIE for a structure or union type.  If TYPE_DECL_SUPPRESS_DEBUG
   is set, we pretend that the type was never defined, so we only get the
   member DIEs needed by later specification DIEs.  
     Generate child dies for template paramaters.  
       First occurrence of type or toplevel definition of nested class.  
     If this type has been completed, then give it a byte_size attribute and
     then give a list of members.  
         Prevent infinite recursion in cases where the type of some member of
         this type is expressed in terms of this type itself.  
         If the first reference to this type was as the return type of an
         inline function, then it may not have a parent.  Fix this now.  
         GNU extension: Record what type our vtable lives in.  
         We don't need to do this for function-local types.  
static void gen_subprogram_die ( tree  ,
dw_die_ref   
)
static
static void gen_subprogram_die ( )
static
   Generate a DIE to represent a declared function (either file-scope or
   block-local).  
     It is possible to have both DECL_ABSTRACT and DECLARATION be true if we
     started to generate the abstract instance of an inline, decided to output
     its containing class, and proceeded to emit the declaration of the inline
     from the member list for the class.  If so, DECLARATION takes priority;
     we'll get back to the abstract instance when done with the class.  
     The class-scope declaration DIE must be the primary DIE.  
     Now that the C++ front end lazily declares artificial member fns, we
     might need to retrofit the declaration into its class.  
         Fixup die_parent for the abstract instance of a nested
         inline function.  
          This is where the actual code for a cloned function is.
          Let's emit linkage name attribute for it.  This helps
          debuggers to e.g, set breakpoints into
          constructors/destructors when the user asks "break
          K::K".  
             We can have a normal definition following an inline one in the
             case of redefinition of GNU C extern inlines.
             It seems reasonable to use AT_specification in this case.  
             Detect and ignore this case, where we are trying to output
             something we have already output.  
         If the definition comes from the same place as the declaration,
         maybe use the old DIE.  We always want the DIE for this function
         that has the *_pc attributes to be under comp_unit_die so the
         debugger can find it.  We also need to do this for abstract
         instances of inlines, since the spec requires the out-of-line copy
         to have the same parent.  For local class methods, this doesn't
         apply; we just use the old DIE.  
             Clear out the declaration attribute and the formal parameters.
             Do not remove all children, because it is possible that this
             declaration die was forced using force_decl_die(). In such
             cases die that forced declaration die (e.g. TAG_imported_module)
             is one of the children that we do not want to remove.  
             If this is an explicit function declaration then generate
             a DW_AT_explicit attribute.  
             The first time we see a member function, it is in the context of
             the class to which it belongs.  We make sure of this by emitting
             the class first.  The next time is the definition, which is
             handled above.  The two may come from the same source text.

             Note that force_decl_die() forces function declaration die. It is
             later reused to represent definition.  
                 We have already generated the labels.  
                 Create start/end labels and add the range.  
         HP OpenVMS Industry Standard 64: DWARF Extensions
         Section 2.3 Prologue and Epilogue Attributes:
         When a breakpoint is set on entry to a function, it is generally
         desirable for execution to be suspended, not on the very first
         instruction of the function, but rather at a point after the
         function's frame has been set up, after any language defined local
         declaration processing has been completed, and before execution of
         the first statement of the function begins. Debuggers generally
         cannot properly determine where this point is.  Similarly for a
         breakpoint set on exit from a function. The prologue and epilogue
         attributes allow a compiler to communicate the location(s) to use.  
             Generate pubnames entries for the split function code ranges.  
                     We should use ranges for non-contiguous code section 
                     addresses.  Use the actual code range for the initial
                     section, since the HOT/COLD labels might precede an 
                     alignment offset.  
                     There is no real support in DW2 for this .. so we make
                     a work-around.  First, emit the pub name for the segment
                     containing the function label.  Then make and emit a
                     simplified subprogram DIE for the second segment with the
                     name pre-fixed by __hot/cold_sect_of_.  We use the same
                     linkage name for the second die so that gdb will find both
                     sections when given "b foo".  
                     Do the 'primary' section.   
                     Build a minimal DIE for the secondary section.  
         We define the "frame base" as the function's CFA.  This is more
         convenient for several reasons: (1) It's stable across the prologue
         and epilogue, which makes it better than just a frame pointer,
         (2) With dwarf3, there exists a one-byte encoding that allows us
         to reference the .debug_frame data by proxy, but failing that,
         (3) We can at least reuse the code inspection and interpretation
         code that determines the CFA position at various points in the
         function.  
         Compute a displacement from the "steady-state frame pointer" to
         the CFA.  The former is what all stack slots and argument slots
         will reference in the rtl; the latter is what we've told the
         debugger about.  We'll need to adjust all frame_base references
         by this displacement.  
     Generate child dies for template paramaters.  
     Now output descriptions of the arguments for this function. This gets
     (unnecessarily?) complex because of the fact that the DECL_ARGUMENT list
     for a FUNCTION_DECL doesn't indicate cases where there was a trailing
     `...' at the end of the formal parameter list.  In order to find out if
     there was a trailing ellipsis or not, we must instead look at the type
     associated with the FUNCTION_DECL.  This will be a node of type
     FUNCTION_TYPE. If the chain of type nodes hanging off of this
     FUNCTION_TYPE node ends with a void_type_node then there should *not* be
     an ellipsis at the end.  
     In the case where we are describing a mere function declaration, all we
     need to do here (and all we *can* do here) is to describe the *types* of
     its formal parameters.  
         Generate DIEs to represent all known formal parameters.  
         Now we want to walk the list of parameters of the function and
         emit their relevant DIEs.

         We consider the case of DECL being an instance of a generic function
         as well as it being a normal function.

         If DECL is an instance of a generic function we walk the
         parameters of the generic function declaration _and_ the parameters of
         DECL itself. This is useful because we want to emit specific DIEs for
         function parameter packs and those are declared as part of the
         generic function declaration. In that particular case,
         the parameter pack yields a DW_TAG_GNU_formal_parameter_pack DIE.
         That DIE has children DIEs representing the set of arguments
         of the pack. Note that the set of pack arguments can be empty.
         In that case, the DW_TAG_GNU_formal_parameter_pack DIE will not have any
         children DIE.

         Otherwise, we just consider the parameters of DECL.  
         Decide whether we need an unspecified_parameters DIE at the end.
         There are 2 more cases to do this for: 1) the ansi ... declaration -
         this is detectable when the end of the arg list is not a
         void_type_node 2) an unprototyped function declaration (not a
         definition).  This just means that we have no info about the
         parameters at all.  
             This is the prototyped case, check for....  
     Output Dwarf info for all of the stuff within the body of the function
     (if it has one - it may be just a declaration).  
     OUTER_SCOPE is a pointer to the outermost BLOCK node created to represent
     a function.  This BLOCK actually represents the outermost binding contour
     for the function, i.e. the contour in which the function's formal
     parameters and labels get declared. Curiously, it appears that the front
     end doesn't actually put the PARM_DECL nodes for the current function onto
     the BLOCK_VARS list for this outer scope, but are strung off of the
     DECL_ARGUMENTS list for the function instead.

     The BLOCK_VARS list for the `outer_scope' does provide us with a list of
     the LABEL_DECL nodes for the function however, and we output DWARF info
     for those in decls_for_scope.  Just within the `outer_scope' there will be
     a BLOCK node representing the function's outermost pair of curly braces,
     and any blocks used for the base and member initializers of a C++
     constructor function.  
         Emit a DW_TAG_variable DIE for a named return value.  
     Add the calling convention attribute if requested.  
static void gen_subroutine_type_die ( tree  ,
dw_die_ref   
)
static
static void gen_subroutine_type_die ( )
static
   Generate a DIE for a subroutine _type_.  
static void gen_tagged_type_die ( tree  type,
dw_die_ref  context_die,
enum debug_info_usage  usage 
)
static
   Generate a DIE for a struct, class, enum or union type.  
     If this is a nested type whose containing class hasn't been written
     out yet, writing it out will cover this one, too.  This does not apply
     to instantiations of member class templates; they need to be added to
     the containing class as they are generated.  FIXME: This hurts the
     idea of combining type decls from multiple TUs, since we can't predict
     what set of template instantiations we'll get.  
         If that failed, attach ourselves to the stub.  
         If this type is local to a function that hasn't been written
         out yet, use a NULL context for now; it will be fixed up in
         decls_for_scope.  
         A declaration DIE doesn't count; nested types need to go in the
         specification.  
         This might have been written out by the call to
         declare_in_namespace.  
     Don't set TREE_ASM_WRITTEN on an incomplete struct; we want to fix
     it up if it is ever completed.  gen_*_type_die will set it for us
     when appropriate.  
static void gen_type_die ( tree  ,
dw_die_ref   
)
static
static void gen_type_die ( )
static
static void gen_type_die_for_member ( tree  ,
tree  ,
dw_die_ref   
)
static

Referenced by add_type_attribute().

static void gen_type_die_for_member ( )
static
   We want to generate the DIE for TYPE so that we can generate the
   die for MEMBER, which has been defined; we will need to refer back
   to the member declaration nested within TYPE.  If we're trying to
   generate minimal debug info for TYPE, processing TYPE won't do the
   trick; we need to attach the member declaration by hand.  
     If we're trying to avoid duplicate debug info, we may not have
     emitted the member decl for this function.  Emit it now.  
             Ignore the nameless fields that are used to skip bits but handle
             C++ anonymous unions and structs.  
static void gen_type_die_with_usage ( tree  type,
dw_die_ref  context_die,
enum debug_info_usage  usage 
)
static
   Generate a type description DIE.  
       The DECL of this type is a typedef we don't want to emit debug
       info for but we want debug info for its underlying typedef.
       This can happen for e.g, the injected-class-name of a C++
       type.  
     If TYPE is a typedef type variant, let's generate debug info
     for the parent typedef which TYPE is a type of.  
         Prevent broken recursion; we can't hand off to the same type.  
         Give typedefs the right scope.  
     If type is an anonymous tagged type named by a typedef, let's
     generate debug info for the typedef.  
         Use the DIE of the containing namespace as the parent DIE of
         the type description DIE we want to generate.  
     If this is an array type with hidden descriptor, handle it first.  
     We are going to output a DIE to represent the unqualified version
     of this type (i.e. without any const or volatile qualifiers) so
     get the main variant (i.e. the unqualified version) of this type
     now.  (Vectors are special because the debugging info is in the
     cloned type itself).  
         We must set TREE_ASM_WRITTEN in case this is a recursive type.  This
         ensures that the gen_type_die recursion will terminate even if the
         type is recursive.  Recursive types are possible in Ada.  
         ??? We could perhaps do this for all types before the switch
         statement.  
         For these types, all that is required is that we output a DIE (or a
         set of DIEs) to represent the "basis" type.  
         This code is used for C++ pointer-to-data-member types.
         Output a description of the relevant class type.  
         Output a description of the type of the object pointed to.  
         Now output a DIE to represent this pointer-to-data-member type
         itself.  
         Force out return type (in case it wasn't forced out already).  
         Force out return type (in case it wasn't forced out already).  
         No DIEs needed for fundamental types.  
         Just use DW_TAG_unspecified_type.  

Referenced by gen_const_die().

static void gen_typedef_die ( tree  ,
dw_die_ref   
)
static
static void gen_typedef_die ( )
static
   Generate a DIE for a type definition.  
                 Here, we are in the case of decl being a typedef naming
                 an anonymous type, e.g:
                     typedef struct {...} foo;
                 In that case TREE_TYPE (decl) is not a typedef variant
                 type and TYPE_NAME of the anonymous type is set to the
                 TYPE_DECL of the typedef. This construct is emitted by
                 the C++ FE.

                 TYPE is the anonymous struct named by the typedef
                 DECL. As we need the DW_AT_type attribute of the
                 DW_TAG_typedef to point to the DIE of TYPE, let's
                 generate that DIE right away. add_type_attribute
                 called below will then pick (via lookup_type_die) that
                 anonymous struct DIE.  
                 This is a GNU Extension.  We are adding a
                 DW_AT_linkage_name attribute to the DIE of the
                 anonymous struct TYPE.  The value of that attribute
                 is the name of the typedef decl naming the anonymous
                 struct.  This greatly eases the work of consumers of
                 this debug info.  
           We want that all subsequent calls to lookup_type_die with
           TYPE in argument yield the DW_TAG_typedef we have just
           created.  
static void gen_unspecified_parameters_die ( tree  ,
dw_die_ref   
)
static
static void gen_unspecified_parameters_die ( )
static
   Generate a special type of DIE used as a stand-in for a trailing ellipsis
   at the end of an (ANSI prototyped) formal parameters list.  
static void gen_variable_die ( tree  ,
tree  ,
dw_die_ref   
)
static
static void gen_variable_die ( )
static
   Generate a DIE to represent a declared data object.
   Either DECL or ORIGIN must be non-null.  
     Symbol in common gets emitted as a child of the common block, in the form
     of a data member.  
                         Optimize the common case.  
                 Avoid sharing the same loc descriptor between
                 DW_TAG_common_block and DW_TAG_variable.  
                 Optimize the common case.  
     If the compiler emitted a definition for the DECL declaration
     and if we already emitted a DIE for it, don't emit a second
     DIE for it again. Allow re-declarations of DECLs that are
     inside functions, though.  
     For static data members, the declaration in the class is supposed
     to have DW_TAG_member tag; the specification should still be
     DW_TAG_variable referencing the DW_TAG_member DIE.  
     Loop unrolling can create multiple blocks that refer to the same
     static variable, so we must test for the DW_AT_declaration flag.

     ??? Loop unrolling/reorder_blocks should perhaps be rewritten to
     copy decls and set the DECL_ABSTRACT flag on them instead of
     sharing them.

     ??? Duplicated blocks have been rewritten to use .debug_ranges.

     ??? The declare_in_namespace support causes us to get two DIEs for one
     variable, both of which are declarations.  We want to avoid considering
     one to be a specification, so we must test that this DIE is not a
     declaration.  
         This is a definition of a C++ class level static.  
             Local static vars are shared between all clones/inlines,
             so emit DW_AT_location on the abstract DIE if DECL_RTL is
             already set.  
         When abstract origin already has DW_AT_location attribute, no need
         to add it again.  
static dw_die_ref generate_skeleton ( dw_die_ref  )
static
static dw_die_ref generate_skeleton ( )
static
   Wrapper function for generate_skeleton_bottom_up.  
     If this type definition is nested inside another type,
     and is not an instantiation of a template, always leave
     at least a declaration in its place.  

References hash_table< Descriptor, Allocator >::create(), dwarf2_build_local_stub(), map, optimize_external_refs_1(), and hash_table< Descriptor, Allocator >::traverse().

static void generate_skeleton_ancestor_tree ( skeleton_chain_node )
static

Referenced by break_out_includes().

static void generate_skeleton_ancestor_tree ( )
static
   Generate the skeleton ancestor tree for the given NODE, then clone
   the DIE and add the clone into the tree.  
static void generate_skeleton_bottom_up ( skeleton_chain_node )
static

Referenced by break_out_includes().

static void generate_skeleton_bottom_up ( )
static
   Generate a skeleton tree of DIEs containing any declarations that are
   found in the original tree.  We traverse the tree looking for declaration
   DIEs, and construct the skeleton from the bottom up whenever we find one.  
               Instantiated templates do not need to be cloned into the
               type unit.  Just move the DIE and its children back to
               the skeleton tree (in the main CU).  
               Clone the existing DIE, move the original to the skeleton
               tree (which is in the main CU), and put the clone, with
               all the original's children, where the original came from
               (which is about to be moved to the type unit).  
static void generate_type_signature ( dw_die_ref  ,
comdat_type_node  
)
static
static void generate_type_signature ( )
static
   Generate the type signature for DIE.  This is computed by generating an
   MD5 checksum over the DIE's tag, its relevant attributes, and its
   children.  Attributes that are references to other DIEs are processed
   by recursion, using the MARK field to prevent infinite recursion.
   If the DIE is nested inside a namespace or another type, we also
   need to include that context in the signature.  The lower 64 bits
   of the resulting MD5 checksum comprise the signature.  
     First, compute a signature for just the type name (and its surrounding
     context, if any.  This is stored in the type unit DIE for link-time
     ODR (one-definition rule) checking.  
         Checksum the names of surrounding namespaces and structures.  
         Checksum the current DIE. 
     Next, compute the complete type signature.  
     Checksum the names of surrounding namespaces and structures.  
     Checksum the DIE and its children.  
     Store the signature in the type node and link the type DIE and the
     type node together.  
     If the DIE is a specification, link its declaration to the type node
     as well.  
static dw_die_ref generic_parameter_die ( tree  parm,
tree  arg,
bool  emit_name_p,
dw_die_ref  parent_die 
)
static
   Create and return a DIE for PARM which should be
   the representation of a generic type parameter.
   For instance, in the C++ front end, PARM would be a template parameter.
   ARG is the argument to PARM.
   EMIT_NAME_P if tree, the DIE will have DW_AT_name attribute set to the
   name of the PARM.
   PARENT_DIE is the parent DIE which the new created DIE should be added to,
   as a child node.  
     We support non-type generic parameters and arguments,
     type generic parameters and arguments, as well as
     generic generic parameters (a.k.a. template template parameters in C++)
     and arguments.  
       PARM is a nontype generic parameter  
       PARM is a type generic parameter.  
       PARM is a generic generic parameter.
       Its DIE is a GNU extension. It shall have a
       DW_AT_name attribute to represent the name of the template template
       parameter, and a DW_AT_GNU_template_name attribute to represent the
       name of the template template argument.  
         If PARM is a generic parameter pack, it means we are
         emitting debug info for a template argument pack element.
         In other terms, ARG is a template argument pack element.
         In that case, we don't emit any DW_AT_name attribute for
         the die.  
             DWARF3, 5.6.8 says if PARM is a non-type generic parameter
             TMPL_DIE should have a child DW_AT_type attribute that is set
             to the type of the argument to PARM, which is ARG.
             If PARM is a type generic parameter, TMPL_DIE should have a
             child DW_AT_type that is set to ARG.  
             So TMPL_DIE is a DIE representing a
             a generic generic template parameter, a.k.a template template
             parameter in C++ and arg is a template.  
             The DW_AT_GNU_template_name attribute of the DIE must be set
             to the name of the argument.  
           So PARM is a non-type generic parameter.
           DWARF3 5.6.8 says we must set a DW_AT_const_value child
           attribute of TMPL_DIE which value represents the value
           of ARG.
           We must be careful here:
           The value of ARG might reference some function decls.
           We might currently be emitting debug info for a generic
           type and types are emitted before function decls, we don't
           know if the function decls referenced by ARG will actually be
           emitted after cgraph computations.
           So must defer the generation of the DW_AT_const_value to
           after cgraph is ready.  

Referenced by output_one_line_info_table().

static bool generic_type_p ( tree  )
static
static bool generic_type_p ( )
static
   Return TRUE if T is an instance of generic type, FALSE
   otherwise.  
static dw_attr_ref get_AT ( dw_die_ref  ,
enum  dwarf_attribute 
)
static
static dw_attr_ref get_AT ( )
static
   Get the attribute of type attr_kind.  

References get_AT_ref().

static struct dwarf_file_data* get_AT_file ( )
staticread

Referenced by gen_array_type_die().

static int get_AT_flag ( dw_die_ref  ,
enum  dwarf_attribute 
)
static

Referenced by gen_array_type_die().

static int get_AT_flag ( )
inlinestatic
   Return the value of the flag attribute designated by ATTR_KIND, or -1
   if it is not present.  

References lookup_type_die(), and strip_naming_typedef().

static const char* get_AT_hi_pc ( dw_die_ref  )
static
static const char* get_AT_hi_pc ( )
inlinestatic
   Return the "high pc" attribute value, typically associated with a subprogram
   DIE.  Return null if the "high pc" attribute is either not present, or if it
   cannot be represented as an assembler label identifier.  

References die_struct::die_tag, get_AT_ref(), and is_naming_typedef_decl().

static const char* get_AT_low_pc ( dw_die_ref  )
static
static const char* get_AT_low_pc ( )
inlinestatic
   Return the "low pc" attribute value, typically associated with a subprogram
   DIE.  Return null if the "low pc" attribute is either not present, or if it
   cannot be represented as an assembler label identifier.  
static dw_die_ref get_AT_ref ( dw_die_ref  ,
enum  dwarf_attribute 
)
inlinestatic

Referenced by get_AT(), and get_AT_hi_pc().

static dw_die_ref get_AT_ref ( )
inlinestatic
static const char* get_AT_string ( dw_die_ref  ,
enum  dwarf_attribute 
)
static
static const char* get_AT_string ( )
inlinestatic
   Return the value of the string attribute designated by ATTR_KIND, or
   NULL if it is not present.  
static unsigned get_AT_unsigned ( dw_die_ref  ,
enum  dwarf_attribute 
)
static
static unsigned get_AT_unsigned ( )
inlinestatic
   Return the value of the unsigned attribute designated by ATTR_KIND, or 0
   if it is not present.  
static unsigned long int get_base_type_offset ( dw_die_ref  )
static
static unsigned long int get_base_type_offset ( )
static
   Return die_offset of a DIE reference to a base type.  
static dw_die_ref get_context_die ( tree  )
inlinestatic

Referenced by prune_unused_types().

static dw_die_ref get_context_die ( )
inlinestatic
   Returns the DIE for a context.  
         Find die that represents this context.  
static dw_die_ref get_die_parent ( )
static
static unsigned long int get_ref_die_offset ( dw_die_ref  )
static
static unsigned long int get_ref_die_offset ( )
static
   Return die_offset of a DIE reference other than base type.  
static void get_ref_die_offset_label ( char *  ,
dw_die_ref   
)
static
static void get_ref_die_offset_label ( )
static
   Set label to debug_info_section_label + die_offset of a DIE reference.  
static dw_die_ref get_skeleton_type_unit ( )
static
   Return the single type-unit die for skeleton type units.  
     For dwarf_split_debug_sections with use_type info, all type units in the
     skeleton sections have identical dies (but different headers).  This
     single die will be output many times.  

References add_ranges_num(), memset(), offset, and ranges_by_label_in_use.

static void hash_loc_list ( )
inlinestatic
   Compute hash of the whole location list LIST_HEAD.  
static hashval_t hash_loc_operands ( dw_loc_descr_ref  ,
hashval_t   
)
static
static hashval_t hash_loc_operands ( )
static
   Helper routines for optimize_location_lists.
   This pass tries to share identical local lists in .debug_loc
   section.  
   Iteratively hash operands of LOC opcode.  
         FALLTHRU 
         FALLTHRU 
         Other codes have no operands.  
static hashval_t hash_locs ( )
inlinestatic
   Iteratively hash the whole DWARF location expression LOC.  
     Compute sizes, so that DW_OP_skip/DW_OP_bra can be checksummed.  
static dw_loc_descr_ref implicit_ptr_descriptor ( )
static
   Helper function for loc_descriptor.  Return DW_OP_GNU_implicit_pointer
   for DEBUG_IMPLICIT_PTR RTL.  

References dw_loc_descr_struct::dw_loc_next, and memcpy().

static bool include_pubname_in_output ( )
static
   Calculate if the entry should appear in the final output file.  It may be
   from a pruned a type.  
     By limiting gnu pubnames to definitions only, gold can generate a
     gdb index without entries for declarations, which don't include
     enough information to be useful.  
         Enumerator names are part of the pubname table, but the
         parent DW_TAG_enumeration_type die may have been pruned.
         Don't output them if that is the case.  
         Everything else in the pubname table is included.  
     The pubtypes table shouldn't include types that have been
     pruned.  

References AT_index(), and dw2_asm_output_data_uleb128().

Referenced by optimize_external_refs_1().

static int index_addr_table_entry ( )
static
   A helper function for dwarf2out_finish called through
   htab_traverse.  Assign an addr_table_entry its index.  All entries
   must be collected into the table when this function is called,
   because the indexing code relies on htab_traverse to traverse nodes
   in the same order for each run. 
     Don't index unreferenced nodes.  

References AT_string(), and get_AT().

static void index_location_lists ( )
static
   Recursively assign each location list a unique index into the debug_addr
   section.  
               Don't index an entry that has already been indexed
               or won't be output.  
static int index_string ( )
static
   A helper function for dwarf2out_finish called through
   htab_traverse.  Assign a string its index.  All strings must be
   collected into the table by the time index_string is called,
   because the indexing code relies on htab_traverse to traverse nodes
   in the same order for each run. 
void init_addr_table_entry ( )
   Initialize an addr_table_entry.  
static void insert_double ( double_int  ,
unsigned char *   
)
static
static void insert_double ( )
static
   Writes double_int values to dw_vec_const array.  
static void insert_float ( const_rtx  ,
unsigned char *   
)
static
static void insert_float ( )
static
   Writes floating point values to dw_vec_const array.  
     real_to_target puts 32-bit pieces in each long.  Pack them.  

References add_const_value_attribute(), initializer_constant_valid_p(), int_size_in_bytes(), and rtl_for_decl_init().

static void insert_int ( HOST_WIDE_INT  ,
unsigned  ,
unsigned char *   
)
static
static void insert_int ( )
static
   Writes integer values to dw_vec_const array.  

References int_size_in_bytes(), and constructor_elt_d::value.

static dw_loc_descr_ref int_loc_descriptor ( HOST_WIDE_INT  )
static
static dw_loc_descr_ref int_loc_descriptor ( )
static
   Return a location descriptor that designates a constant.  
     Pick the smallest representation of a constant, rather than just
     defaulting to the LEB encoding.  
           DW_OP_litX DW_OP_litY DW_OP_shl takes just 3 bytes and
           DW_OP_litX DW_OP_const1u Y DW_OP_shl takes just 4 bytes,
           while DW_OP_const4u is 5 bytes.  
           DW_OP_const1u X DW_OP_litY DW_OP_shl takes just 4 bytes,
           while DW_OP_const4u is 5 bytes.  
           DW_OP_const1u X DW_OP_const1u Y DW_OP_shl takes just 5 bytes,
           while DW_OP_constu of constant >= 0x100000000 takes at least
           6 bytes.  
           DW_OP_const2u X DW_OP_litY DW_OP_shl takes just 5 bytes,
           DW_OP_const2u X DW_OP_const1u Y DW_OP_shl takes 6 bytes,
           while DW_OP_constu takes in this case at least 6 bytes.  
           DW_OP_const4u X DW_OP_litY DW_OP_shl takes just 7 bytes.  
static dw_loc_descr_ref int_shift_loc_descriptor ( )
static
   Return a location descriptor that designates a constant i,
   as a compound operation from constant (i >> shift), constant shift
   and DW_OP_shl.  
static bool is_ada ( )
inlinestatic
   Return TRUE if the language is Ada.  

Referenced by add_gnat_descriptive_type_attribute().

static int is_base_type ( tree  )
static
static int is_base_type ( )
inlinestatic
   Given a pointer to an arbitrary ..._TYPE tree node, return nonzero if the
   given input type is a Dwarf "fundamental" type.  Otherwise return null.  
static int is_based_loc ( const_rtx  )
static
static int is_based_loc ( )
inlinestatic
   Return true if this RTL expression describes a base+offset calculation.  
static bool is_class_die ( )
inlinestatic
   Returns true iff C is a class or structure DIE.  

References copy().

static int is_comdat_die ( dw_die_ref  )
static
static int is_comdat_die ( )
static
   Returns 1 iff C is the sort of DIE that should go into a COMDAT CU.
   Basically, we want to choose the bits that are likely to be shared between
   compilations (types) and leave out the bits that are specific to individual
   compilations (functions).  
     I think we want to leave base types and __vtbl_ptr_type in the main CU, as
     we do for stabs.  The advantage is a greater likelihood of sharing between
     objects that don't include headers in the same order (and therefore would
     put the base types in a different comdat).  jason 8/28/00 

References add_child_die(), clone_die(), and clone_tree().

static bool is_cu_die ( )
inlinestatic
   Returns true iff C is a compile-unit DIE.  

Referenced by gen_array_type_die().

static bool is_cxx ( )
inlinestatic
   Return TRUE if the language is C++.  
static int is_declaration_die ( dw_die_ref  )
static
static int is_declaration_die ( )
static
   Return non-zero if this DIE is a declaration.  

References copy_declaration_context().

static bool is_fortran ( void  )
inlinestatic
   Return TRUE if the language is Fortran.  

Referenced by add_gnat_descriptive_type_attribute().

static bool is_java ( )
inlinestatic
   Return TRUE if the language is Java.  
static bool is_namespace_die ( )
inlinestatic
   Returns true iff C is a namespace DIE.  
static bool is_naming_typedef_decl ( const_tree  )
static

Referenced by get_AT_hi_pc().

static bool is_naming_typedef_decl ( )
static
   Return TRUE if TYPE is a typedef that names a type for linkage
   purposes. This kind of typedefs is produced by the C++ FE for
   constructs like:

   typedef struct {...} foo;

   In that case, there is no typedef variant type produced for foo.
   Rather, the TREE_TYPE of the TYPE_DECL of foo is the anonymous
   struct type.  
         It looks like Ada produces TYPE_DECLs that are very similar
         to C++ naming typedefs but that have different
         semantics. Let's be specific to c++ for now.  
static int is_nested_in_subprogram ( )
static
   Return non-zero if this DIE is nested inside a subprogram.  
static int is_pseudo_reg ( const_rtx  )
static
   Forward declarations for functions defined in this file.  

Referenced by loc_descriptor_from_tree().

static int is_pseudo_reg ( )
inlinestatic
static int is_redundant_typedef ( const_tree  )
inlinestatic
static int is_redundant_typedef ( )
inlinestatic
   Is this a typedef we can avoid emitting?  
       Also ignore the artificial member typedef for the class name.  

References loclabel_num.

static int is_symbol_die ( dw_die_ref  )
static
static int is_symbol_die ( )
static
   Returns 1 iff C is the sort of DIE that might be referred to from another
   compilation unit.  

References add_AT_die_ref(), clone_die(), and die_struct::comdat_type_p.

static int is_tagged_type ( const_tree  )
static
static int is_tagged_type ( )
inlinestatic
   Return nonzero if the given type node represents a tagged type.  
static bool is_template_instantiation ( dw_die_ref  )
inlinestatic

Referenced by break_out_includes().

static bool is_template_instantiation ( )
inlinestatic
   Return non-zero if this DIE represents a template instantiation.  
static bool is_template_parameter ( )
inlinestatic
   Return non-zero if this DIE is a template parameter.  
static int is_type_die ( dw_die_ref  )
static
static int is_type_die ( )
static
   Returns nonzero if DIE represents a type, in the sense of TYPE_P.  
static bool is_unit_die ( )
inlinestatic
   Returns true iff C is a unit DIE of some sort.  
static void loc_checksum ( dw_loc_descr_ref  ,
struct md5_ctx *   
)
static
static void loc_checksum ( )
inlinestatic
   Calculate the checksum of a location expression.  
static void loc_checksum_ordered ( dw_loc_descr_ref  ,
struct md5_ctx *   
)
static
static void loc_checksum_ordered ( )
inlinestatic
   Calculate the checksum of a location expression.  
     Special case for lone DW_OP_plus_uconst: checksum as if the location
     were emitted as a DW_FORM_sdata instead of a location expression.  
     Otherwise, just checksum the raw location expression.  
bool loc_descr_equal_p ( )
   Compare two complete location expressions for exact equality.  

Referenced by lookup_cfa_1().

static bool loc_descr_equal_p_1 ( )
static
   Compare two location atoms for exact equality.  
     ??? This is only ever set for DW_OP_constNu, for N equal to the
     address size, but since we always allocate cleared storage it
     should be zero for other types of locations.  

References dw_loc_descr_struct::dw_loc_oprnd1, addr_table_entry_struct::index, size_of_uleb128(), and dw_val_struct::val_entry.

static void loc_descr_plus_const ( )
static
   Add a constant OFFSET to a location expression.  
     Find the end of the chain.  
     If the last operation is fbreg, breg{0..31,x}, optimize by adjusting its
     offset.  Don't optimize if an signed integer overflow would happen.  
static dw_loc_descr_ref loc_descriptor ( rtx  rtl,
enum machine_mode  mode,
enum var_init_status  initialized 
)
static
   Output a proper Dwarf location descriptor for a variable or parameter
   which is either allocated in a register or in a memory location.  For a
   register, we just generate an OP_REG and the register number.  For a
   memory location we provide a Dwarf postfix expression describing how to
   generate the (dynamic) address of the object onto the address stack.

   MODE is mode of the decl if this loc_descriptor is going to be used in
   .debug_loc section where DW_OP_stack_value and DW_OP_implicit_value are
   allowed, VOIDmode otherwise.

   If we don't know how to describe it, return 0.  
         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.  
         Single part.  
         FALLTHRU 
           Create the first one, so we have something to add to.  
             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.  
         FALLTHROUGH 
         FALLTHRU 
             Value expression.  
static dw_loc_descr_ref loc_descriptor_from_tree ( tree  ,
int   
)
static
static dw_loc_descr_ref loc_descriptor_from_tree ( )
static
   Same as above but return only single location expression.  

References is_pseudo_reg().

static dw_loc_list_ref loc_list_for_address_of_addr_expr_of_indirect_ref ( )
static
   Return dw_loc_list representing address of addr_expr LOC
   by looking for inner INDIRECT_REF expression and turning
   it into simple arithmetics.  
             Variable offset.  
static dw_loc_list_ref loc_list_from_tree ( tree  ,
int   
)
static
static dw_loc_list_ref loc_list_from_tree ( )
static
   Generate Dwarf location list representing LOC.
   If WANT_ADDRESS is false, expression computing LOC will be computed
   If WANT_ADDRESS is 1, expression computing address of LOC will be returned
   if WANT_ADDRESS is 2, expression computing address useable in location
     will be returned (i.e. DW_OP_reg can be used
     to refer to register values).  
     ??? Most of the time we do not take proper care for sign/zero
     extending the values properly.  Hopefully this won't be a real
     problem...  
         This case involves extracting fields from an object to determine the
         position of other fields.  We don't try to encode this here.  The
         only user of this is Ada, which encodes the needed information using
         the names of types.  
         There are no opcodes for these operations.  
         There are no opcodes for these operations.  
         If we already want an address, see if there is INDIRECT_REF inside
         e.g. for &this->field.  
           Otherwise, process the argument and look for the address.  
                 If this is not defined, we have no way to emit the
                 data.  
                  The way DW_OP_GNU_push_tls_address is specified, we
                  can only look up addresses of objects in the current
                  module.  We used DW_OP_addr as first op, but that's
                  wrong, because DW_OP_addr is relocated by the debug
                  info consumer, while DW_OP_GNU_push_tls_address
                  operand shouldn't be.  
                 We stuffed the control variable into the DECL_VALUE_EXPR
                 to signal (via DECL_HAS_VALUE_EXPR_P) that the decl should
                 no longer appear in gimple code.  We used the control
                 variable in specific so that we could pick it up here.  
         FALLTHRU 
         FALLTHRU 
               Certain constructs can only be represented at top-level.  
         ??? FIXME.  
         Fallthru.  
           TODO: We can extract value of the small expression via shifting even
           for nonzero bitpos.  
               Variable offset.  
         We can construct small constants here using int_loc_descriptor.  
         ... fall through ...  
           ??? Need a node to point the skip at.  Use a nop.  
         Leave front-end specific codes as simply unknown.  This comes
         up, for instance, with the C STMT_EXPR.  
         Otherwise this is a generic code; we should just lists all of
         these explicitly.  We forgot one.  
         In a release build, we want to degrade gracefully: better to
         generate incomplete debugging information than to crash.  
     Show if we can't fill the request for an address.  
     If we've got an address and don't want one, dereference.  

References add_AT_loc(), add_AT_loc_list(), dw_loc_list_struct::expr, and single_element_loc_list_p().

static void loc_list_plus_const ( )
static
   Add a constant OFFSET to a location list.  
static int local_scope_p ( dw_die_ref  )
inlinestatic

Referenced by gen_array_type_die().

static int local_scope_p ( )
inlinestatic
   Returns nonzero if CONTEXT_DIE is internal to a function.  

References set_block_abstract_flags().

static dw_die_ref lookup_decl_die ( )
inlinestatic
   Return the DIE associated with a given declaration.  
static var_loc_list* lookup_decl_loc ( const_tree  )
static
static var_loc_list* lookup_decl_loc ( )
inlinestatic
   Return the var_loc list associated with a given declaration.  

References memset().

static struct external_ref* lookup_external_ref ( )
staticread
   Return a pointer to the external_ref for references to DIE.  

References pubname_struct::die, die_struct::die_parent, die_struct::die_perennial_p, and die_struct::die_tag.

Referenced by remove_child_or_replace_with_skeleton().

static struct dwarf_file_data* lookup_filename ( const char *  )
staticread
static struct dwarf_file_data* lookup_filename ( )
staticread
   Lookup FILE_NAME (in the list of filenames that we know about here in
   dwarf2out.c) and return its "index".  The index of each (known) filename is
   just a unique number which is associated with only that one filename.  We
   need such numbers for the sake of generating labels (in the .debug_sfnames
   section) and references to those files numbers (in the .debug_srcinfo
   and.debug_macinfo sections).  If the filename given as an argument is not
   found in our current list, add it to the list and assign it the next
   available unique index number.  In order to speed up searches, we remember
   the index of the filename was looked up last.  This handles the majority of
   all searches.  
     Check to see if the file name that was searched on the previous
     call matches this file name.  If so, return the index.  
     Didn't match the previous lookup, search the table.  
static dw_die_ref lookup_type_die ( tree  )
static
static dw_die_ref lookup_type_die ( )
inlinestatic
   Return the DIE associated with the given type specifier.  
static dw_die_ref lookup_type_die_strip_naming_typedef ( tree  )
static
static dw_die_ref lookup_type_die_strip_naming_typedef ( )
inlinestatic
   Like lookup_type_die, but if type is an anonymous type named by a
   typedef[1], return the DIE of the anonymous type instead the one of
   the naming typedef.  This is because in gen_typedef_die, we did
   equate the anonymous struct named by the typedef with the DIE of
   the naming typedef. So by default, lookup_type_die on an anonymous
   struct yields the DIE of the naming typedef.

   [1]: Read the comment of is_naming_typedef_decl to learn about what
   a naming typedef is.  

References decl_piece_bitsize().

static int lower_bound_default ( )
static
   Return the default for DW_AT_lower_bound, or -1 if there is not any
   default.  

References add_bound_info(), and new_die().

static void mark_base_types ( )
static
   Helper function for resolve_addr, mark DW_TAG_base_type nodes
   referenced from typed stack ops and count how often they are used.  
             FALLTHRU 
static void mark_dies ( dw_die_ref  )
static
static void mark_dies ( )
static
   Set the marks for a die and its children.  We do this so
   that we know whether or not a reference needs to use FORM_ref_addr; only
   DIEs in the same CU will be marked.  We used to clear out the offset
   and use that as the flag, but ran into ordering problems.  
static int matches_main_base ( )
static
   Match the base name of a file to the base name of a compilation unit. 
     Cache the last query. 

Referenced by dump_struct_debug().

static int maybe_emit_file ( struct dwarf_file_data fd)
static
static int maybe_emit_file ( )
static
   If the assembler will construct the file table, then translate the compiler
   internal file table number into the assembler file table number, and emit
   a .file directive if we haven't already emitted one yet.  The file table
   numbers are different because we prune debug info for unused variables and
   types, which may include filenames.  
dw_loc_descr_ref 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().

static tree member_declared_type ( const_tree  )
static
static tree member_declared_type ( )
inlinestatic
   Return the type associated with a data member, make a special check
   for bit field types.  

References call_arg_loc_node::block, and block_map.

static dw_loc_descr_ref minmax_loc_descriptor ( rtx  rtl,
enum machine_mode  mode,
enum machine_mode  mem_mode 
)
static
   Return location descriptor for {U,S}{MIN,MAX}.  
static dw_die_ref modified_type_die ( tree  type,
int  is_const_type,
int  is_volatile_type,
dw_die_ref  context_die 
)
static
   Given a pointer to an arbitrary ..._TYPE tree node, return a debugging
   entry that chains various modifiers in front of the given type.  
     See if we already have the appropriately qualified variant of
     this type.  
     If we do, then we can just use its DIE, if it exists.  
     Handle C typedef types.  
             For a named type, use the typedef.  
           cv-unqualified version of named type.  Just use the unnamed
           type to which it refers.  
         Else cv-qualified version of named type; fall through.  
         If both is_const_type and is_volatile_type, prefer the path
         which leads to a qualified type.  
         We have to get the type_main_variant here (and pass that to the
         `lookup_type_die' routine) because the ..._TYPE node we have
         might simply be a *copy* of some original type node (where the
         copy was created to help us keep track of typedef names) and
         that copy might have a different TYPE_UID from the original
         ..._TYPE node.  
           Vectors have the debugging information in the type,
           not the main variant.  
     Builtin types don't have a DECL_ORIGINAL_TYPE.  For those,
     don't output a DW_TAG_typedef, since there isn't one in the
     user's program; just attach a DW_AT_name to the type.
     Don't attach a DW_AT_name to DW_TAG_const_type or DW_TAG_volatile_type
     if the base type already has the same name.  
           Could just call add_name_and_src_coords_attributes here,
           but since this is a builtin type it doesn't have any
           useful source coordinates anyway.  
     This probably indicates a bug.  
       We must do this after the equate_type_number_to_die call, in case
       this is a recursive type.  This ensures that the modified_type_die
       recursion will terminate even if the type is recursive.  Recursive
       types are possible in Ada.  

References add_loc_descr(), int_loc_descriptor(), new_loc_descr(), and size_of_int_loc_descriptor().

static void move_all_children ( )
static
   Move all children from OLD_PARENT to NEW_PARENT.  

References copy().

Referenced by break_out_includes().

static void move_linkage_attr ( )
inlinestatic
   Move a DW_AT_{,MIPS_}linkage_name attribute just added to dw_die_ref
   to the location it would have been added, should we know its
   DECL_ASSEMBLER_NAME when we added other attributes.  This will
   probably improve compactness of debug info, removing equivalent
   abbrevs, and hide any differences caused by deferring the
   computation of the assembler name, triggered by e.g. PCH.  

References add_AT_low_high_pc(), and text_section_used.

static void move_marked_base_types ( )
static
   Move base types marked by mark_base_types as early as possible
   in the CU, sorted by decreasing usage count both to make the
   uleb128 references as small as possible and to make sure they
   will have die_offset already computed by calc_die_sizes when
   sizes of typed stack loc ops is computed.  
     Sort by decreasing usage count, they will be added again in that
     order later on.  
             As base types got marked, there must be at least
             one node other than DW_TAG_base_type.  
static dw_loc_descr_ref multiple_reg_loc_descriptor ( rtx  rtl,
rtx  regs,
enum var_init_status  initialized 
)
static
   Given an RTL of a register, return a location descriptor that
   designates a value that spans more than one register.  
     Simple, contiguous registers.  
     Now onto stupid register sets in non contiguous locations.  
static bool native_encode_initializer ( )
static
   Helper function for tree_add_const_value_attribute.  Natively encode
   initializer INIT into an array.  Return true if successful.  

Referenced by add_data_member_location_attribute().

static dw_loc_descr_ref new_addr_loc_descr ( )
inlinestatic
   Return a pointer to a newly allocated address location description.  If
   dwarf_split_debug_info is true, then record the address with the appropriate
   relocation.  
static dw_die_ref new_die ( )
inlinestatic
   Return a pointer to a newly created DIE node.  
static dw_line_info_table * new_line_info_table ( )
static
   Create a new line number table.  
static dw_loc_descr_ref new_loc_descr ( enum dwarf_location_atom  op,
unsigned HOST_WIDE_INT  oprnd1,
unsigned HOST_WIDE_INT  oprnd2 
)
inlinestatic
   Return a pointer to a newly allocated location description.  Location
   descriptions are simple expression terms that can be strung
   together to form more complicated location (address) descriptions.  

References dw_vec_struct::array, dw_vec_struct::elt_size, dw_vec_struct::length, dw_val_struct::v, and dw_val_struct::dw_val_struct_union::val_vec.

Referenced by add_loc_descr_op_piece(), convert_descriptor_to_mode(), dbx_reg_number(), gen_generic_params_dies(), modified_type_die(), reg_loc_descriptor(), retry_incomplete_types(), and scompare_loc_descriptor().

static dw_loc_descr_ref new_loc_descr_op_bit_piece ( )
static
   Create a DW_OP_piece or DW_OP_bit_piece for bitsize, or return NULL
   if it is not possible.  
static dw_loc_list_ref new_loc_list ( dw_loc_descr_ref  expr,
const char *  begin,
const char *  end,
const char *  section 
)
inlinestatic
   Return a new location list, given the begin and end range, and the
   expression.  
static dw_loc_descr_ref new_reg_loc_descr ( )
inlinestatic
   Return a pointer to a newly allocated location description for
   REG and OFFSET.  

References dw_loc_descr_struct::dtprel.

static dw_loc_descr_ref one_reg_loc_descriptor ( unsigned  int,
enum  var_init_status 
)
static
static dw_loc_descr_ref one_reg_loc_descriptor ( )
static
   Return a location descriptor that designates a machine register for
   a given hard register number.  
static external_ref_hash_type optimize_external_refs ( )
static
   DIE is a unit; look through all the DIE references to see if there are
   any external references to types, and if so, create local stubs for
   them which will be applied in build_abbrev_table.  This is useful because
   references to local DIEs are smaller.  

Referenced by output_loc_list_offset().

static void optimize_external_refs_1 ( )
static
   Subroutine of optimize_external_refs, below.

   If we see a type skeleton, record it as our stub.  If we see external
   references, remember how many we've seen.  
         This is a local skeleton; use it for local references.  
     Scan the DIE references, and remember any that refer to DIEs from
     other CUs (i.e. those which are not marked).  

References include_pubname_in_output(), pubname_struct::name, and strlen().

Referenced by generate_skeleton().

static void optimize_location_into_implicit_ptr ( )
static
   Helper function of resolve_addr.  DIE had DW_AT_location of
   DW_OP_addr alone, which referred to DECL in DW_OP_addr's operand
   and DW_OP_addr couldn't be resolved.  resolve_addr has already
   removed the DW_AT_location attribute.  This function attempts to
   add a new DW_AT_location attribute with DW_OP_GNU_implicit_pointer
   to it or DW_AT_const_value attribute, if possible.  
     For variables that have been optimized away and thus
     don't have a memory location, see if we can emit
     DW_AT_const_value instead.  
     If init is ADDR_EXPR or POINTER_PLUS_EXPR of ADDR_EXPR,
     and ADDR_EXPR refers to a decl that has DW_AT_location or
     DW_AT_const_value (but isn't addressable, otherwise
     resolving the original DW_OP_addr wouldn't fail), see if
     we can add DW_OP_GNU_implicit_pointer.  

Referenced by dwarf2out_init().

static void optimize_location_lists ( )
static
   Optimize location lists referenced from DIE
   children and share them whenever possible.  
static void optimize_location_lists_1 ( )
static
   Recursively optimize location lists referenced from DIE
   children and share them whenever possible.  
           TODO: perform some optimizations here, before hashing
           it and storing into the hash table.  
static unsigned optimize_macinfo_range ( unsigned int  idx,
vec< macinfo_entry, va_gc > *  files,
macinfo_hash_type macinfo_htab 
)
static
   Attempt to make a sequence of define/undef macinfo ops shareable with
   other compilation unit .debug_macinfo sections.  IDX is the first
   index of a define/undef, return the number of ops that should be
   emitted in a comdat .debug_macinfo section and emit
   a DW_MACRO_GNU_transparent_include entry referencing it.
   If the define/undef entry should be emitted normally, return 0.  
     Optimize only if there are at least two consecutive define/undef ops,
     and either all of them are before first DW_MACINFO_start_file
     with lineno {0,1} (i.e. predefined macro block), or all of them are
     in some included header file.  
     Find the last define/undef entry that can be grouped together
     with first and at the same time compute md5 checksum of their
     codes, linenumbers and strings.  
     From the containing include filename (if any) pick up just
     usable characters from its basename.  
     Count . at the end.  
     The group name format is: wmN.[<encoded filename>.]<lineno>.<md5sum>  
     Construct a macinfo_entry for DW_MACRO_GNU_transparent_include
     in the empty vector entry before the first define/undef.  
     Avoid emitting duplicates.  
         If such an entry has been used before, just emit
         a DW_MACRO_GNU_transparent_include op.  
         And clear all macinfo_entry in the range to avoid emitting them
         in the second pass.  
static bool optimize_one_addr_into_implicit_ptr ( )
static
   Helper function of resolve_addr_in_expr.  LOC is
   a DW_OP_addr followed by DW_OP_stack_value, either at the start
   of exprloc or after DW_OP_{,bit_}piece, and val_addr can't be
   resolved.  Replace it (both DW_OP_addr and DW_OP_stack_value)
   with DW_OP_GNU_implicit_pointer if possible
   and return true, if unsuccessful, return false.  
static void output_abbrev_section ( )
static
   Output the .debug_abbrev section which defines the DIE abbreviation
   table.  
     Terminate the table.  
static void output_addr_table ( )
static
   Produce the .debug_addr section.  

References dw_loc_descr_struct::dtprel.

static int output_addr_table_entry ( )
static
   Callback for htab_traverse to assign an index to an entry in the
   table, and to write that entry to the .debug_addr section.  
static void output_aranges ( unsigned  long)
static
static void output_aranges ( )
static
   Output the information that goes into the .debug_aranges table.
   Namely, define the beginning and ending address range of the
   text section generated for this compilation unit.  
     Version number for aranges is still 2, even in DWARF3.  
     We need to align to twice the pointer size here.  
         Pad using a 2 byte words so that padding is correct for any
         pointer size.  
     It is necessary not to output these entries if the sections were
     not used; if the sections were not used, the length will be 0 and
     the address may end up as 0 if the section is discarded by ld
     --gc-sections, leaving an invalid (0, 0) entry that can be
     confused with the terminator.  
     Output the terminator words.  

References dw2_asm_output_addr(), dw2_asm_output_data(), dw2_asm_output_data_sleb128(), dw2_asm_output_data_uleb128(), dw_line_info_table_struct::entries, LI_negate_stmt, LI_set_address, LI_set_column, LI_set_discriminator, LI_set_epilogue_begin, LI_set_file, LI_set_line, LI_set_prologue_end, dw_line_info_struct::opcode, size_of_uleb128(), and dw_line_info_struct::val.

static void output_attr_index_or_value ( )
static
   Output an attribute's index or value appropriately.  

References targetm.

Referenced by size_of_aranges().

static void output_call_frame_info ( int  )
static
static void output_call_frame_info ( )
static
   Output the call frame information used to record information
   that relates to calculating the frame pointer, and records the
   location of saved registers.  
     Don't emit a CIE if there won't be any FDEs.  
     Nothing to do if the assembler's doing it all.  
     If we don't have any functions we'll want to unwind out of, don't emit
     any EH unwind information.  If we make FDEs linkonce, we may have to
     emit an empty label for an FDE that wouldn't otherwise be emitted.  We
     want to avoid having an FDE kept around when the function it refers to
     is discarded.  Example where this matters: a primary function template
     in C++ requires EH information, an explicit specialization doesn't.  
     We're going to be generating comments, so turn on app.  
     Switch to the proper frame section, first time.  
     Output the CIE.  
     Now that the CIE pointer is PC-relative for EH,
     use 0 to identify the CIE.  
     Use the CIE version 3 for DWARF3; allow DWARF2 to continue to
     use CIE version 1, unless that would produce incorrect results
     due to overflowing the return register column.  
         Augmentation:
         z      Indicates that a uleb128 is present to size the
                augmentation section.
         L      Indicates the encoding (and thus presence) of
                an LSDA pointer in the FDE augmentation.
         R      Indicates a non-default pointer encoding for
                FDE code pointers.
         P      Indicates the presence of an encoding + language
                personality routine in the CIE augmentation.  
         Ug.  Some platforms can't do unaligned dynamic relocations at all.  
             Augmentations should be small, so there's scarce need to
             iterate for a solution.  Die if we exceed one uleb128 byte.  
     Pad the CIE out to an address sized boundary.  
     Loop through all of the FDE's.  
         Don't emit EH unwind info for leaf functions that don't need it.  
     Turn off app to make assembly quicker.  

References targetm.

static void output_comdat_type_unit ( comdat_type_node )
static
static void output_comdat_type_unit ( )
static
   Output a comdat type unit DIE and its children.  
     First mark all the DIEs in this CU so we know which get local refs.  
     Initialize the beginning DIE offset - and calculate sizes/offsets.  
     Output debugging information.  
         Produce the skeleton type-unit header.  
static void output_comp_unit ( dw_die_ref  ,
int   
)
static
static void output_comp_unit ( )
static
   Output the compilation unit DIE and its children.  
     Unless we are outputting main CU, we may throw away empty ones.  
     Even if there are no children of this DIE, we must output the information
     about the compilation unit.  Otherwise, on an empty translation unit, we
     will generate a present, but empty, .debug_info section.  IRIX 6.5 `nm'
     will then complain when examining the file.  First mark all the DIEs in
     this CU so we know which get local refs.  
     Initialize the beginning DIE offset - and calculate sizes/offsets.  
     Output debugging information.  
     Leave the marks on the main CU, so we can check them in
     output_pubnames.  
static void output_compilation_unit_header ( )
static
   Output the compilation unit that appears at the beginning of the
   .debug_info section, and precedes the DIE descriptions.  
static void output_die ( dw_die_ref  )
static
static void output_die ( )
static
   Output the DIE and its attributes.  Called recursively to generate
   the definitions of each child DIE.  
     If someone in another CU might refer to us, set up a symbol for
     them to point to.  
             Output the block length for this list of location operations.  
             ??? It would be slightly more efficient to use a scheme like is
             used for unsigned constants below, but gdb 4.x does not sign
             extend.  Gdb 5.x does sign extend.  
                 Currently all add_AT_flag calls pass in 1 as last argument,
                 so DW_FORM_flag_present can be used.  If that ever changes,
                 we'll need to use DW_FORM_flag and have some optimization
                 in build_abbrev_table that will change those to
                 DW_FORM_flag_present if it is set to 1 in all DIEs using
                 the same abbrev entry.  
                     In DWARF2, DW_FORM_ref_addr is sized by target address
                     length, whereas in DWARF3 it's always sized as an
                     offset.  
     Add null byte to terminate sibling list.  

References targetm.

static void output_die_abbrevs ( unsigned  long,
dw_die_ref   
)
static
static void output_die_abbrevs ( )
static
   Given a die and id, produce the appropriate abbreviations.  
static void output_die_symbol ( dw_die_ref  )
static

Referenced by size_of_pubnames().

static void output_die_symbol ( )
inlinestatic
   Output a symbol we can use to refer to this DIE from another CU.  
       We make these global, not weak; if the target doesn't support
       .linkonce, it doesn't support combining the sections, so debugging
       will break.  
static void output_fde ( dw_fde_ref  fde,
bool  for_eh,
bool  second,
char *  section_start_label,
int  fde_encoding,
char *  augmentation,
bool  any_lsda_needed,
int  lsda_encoding 
)
static
   Output one FDE.  
                                        empty 
     Loop through the Call Frame Instructions associated with this FDE.  
     If we are to emit a ref/link from function bodies to their frame tables,
     do it now.  This is typically performed to make sure that tables
     associated with functions are dragged with them and not discarded in
     garbage collecting links. We need to do this on a per function basis to
     cope with -ffunction-sections.  
     Switch to the function section, emit the ref to the tables, and
     switch *back* into the table section.  
     Pad the FDE out to an address sized boundary.  
static void output_file_names ( )
static
   Output the directory table and the file name table.  We try to minimize
   the total amount of memory needed.  A heuristic is used to avoid large
   slowdowns with many input files.  
     Allocate the various arrays we need.  
     Find all the different directories used.  
           Same directory as last entry.  
           This is a new directory.  
           Search for a prefix.  
     Now to the actual work.  We have to find a subset of the directories which
     allow expressing the file name using references to the directory table
     with the least amount of characters.  We do not do an exhaustive search
     where we would have to check out every combination of every single
     possible prefix.  Instead we use a heuristic which provides nearly optimal
     results in most cases and never is much off.  
         We can always save some space for the current directory.  But this
         does not mean it will be enough to justify adding the directory.  
                 Determine whether the dirs[i] path is a prefix of the
                 dirs[j] path.  
                     Yes it is.  We can possibly save some memory by
                     writing the filenames in dirs[j] relative to
                     dirs[i].  
         Check whether we can save enough to justify adding the dirs[i]
         directory.  
             It's worthwhile adding.  
                   Remember how much we saved for this directory so far.  
                   Remember the prefix directory.  
     Emit the directory name table.  
     We have to emit them in the order of emitted_number since that's
     used in the debug info generation.  To do this efficiently we
     generate a back-mapping of the indices first.  
     Now write all the file names.  
         Setting these fields can lead to debugger miscomparisons,
         but VMS Debug requires them to be set correctly.  
         Include directory index.  
         Modification time.  
         File length in bytes.  
         Include directory index.  
         Modification time.  
         File length in bytes.  
static int output_index_string ( )
static
   A helper function for dwarf2out_finish called through
   htab_traverse.  Output the indexed string.  
         Assert that the strings are output in the same order as their
         indexes were assigned.  
static int output_index_string_offset ( )
static
   A helper function for output_indirect_strings called through
   htab_traverse.  Output the offset to a string and update the
   current offset.  
         Assert that this node has been assigned an index.  

References addr_table_entry_struct::addr, dw_loc_descr_struct::dtprel, iterative_hash_rtx(), addr_table_entry_struct::addr_table_entry_struct_union::rtl, and dw_val_struct::val_entry.

static int output_indirect_string ( void **  ,
void *   
)
static
   And now, the support for symbolic debugging information.  
   .debug_str support.  
static int output_indirect_string ( )
static
   A helper function for dwarf2out_finish called through
   htab_traverse.  Emit one queued .debug_str string.  
static void output_indirect_strings ( )
static
   Output the indexed string table.  
static void output_line_info ( bool  )
static
static void output_line_info ( )
static
   Output the source line number correspondence information.  This
   information goes into the .debug_line section.  
     Define the architecture-dependent minimum instruction length (in bytes).
     In this implementation of DWARF, this field is used for information
     purposes only.  Since GCC generates assembly language, we have no
     a priori knowledge of how many instruction bytes are generated for each
     source line, and therefore can use only the DW_LNE_set_address and
     DW_LNS_fixed_advance_pc line information commands.  Accordingly, we fix
     this as '1', which is "correct enough" for all architectures,
     and don't let the target override.  
     Write out the information about the files we use.  
         Output the marker for the end of the line number info.  
     ??? Some Darwin linkers crash on a .debug_line section with no
     sequences.  Further, merely a DW_LNE_end_sequence entry is not
     sufficient -- the address column must also be initialized.
     Make sure to output at least one set_address/end_sequence pair,
     choosing .text since that section is always present.  
     Output the marker for the end of the line number info.  
static void output_loc_list ( dw_loc_list_ref  )
static
static void output_loc_list ( )
static
   Output the location list given to us.  
     Walk the location list, and output each range + expression.  
         Don't output an entry that starts and ends at the same address.  
         If the expression is too large, drop it on the floor.  We could
         perhaps put it into DW_TAG_dwarf_procedure and refer to that
         in the expression, but >= 64KB expressions for a single value
         in a single range are unlikely very useful.  
             The length field is 4 bytes.  If we ever need to support
            an 8-byte length, we can add a new DW_LLE code or fall back
            to DW_LLE_GNU_start_end_entry.  
         Output the block length for this list of location operations.  

References add_AT_flag(), and want_pubnames().

static void output_loc_list_offset ( )
static
   Output the offset into the debug_loc section.  

References build_abbrev_table(), mark_dies(), optimize_external_refs(), and comdat_type_struct::root_die.

static void output_loc_operands ( )
static
   Output location description stack opcode's operands (if any).
   The for_eh_or_skip parameter controls whether register numbers are
   converted using DWARF2_FRAME_REG_OUT, which is needed in the case that
   hard reg numbers have been processed via DWARF_FRAME_REGNUM (i.e. for unwind
   info).  This should be suppressed for the cases that have not been converted
   (i.e. symbolic debug info), by setting the parameter < 0.  See PR47324.  
         FALLTHRU 
         FALLTHRU 
         We currently don't make any attempt to make sure these are
         aligned properly like we do for the main unwind info, so
         don't support emitting things larger than a byte if we're
         only doing unwinding.  
         Other codes have no operands.  
static void output_loc_operands_raw ( )
static
   Output location description stack opcode's operands (if any).
   The output is single bytes on a line, suitable for .cfi_escape.  
         We cannot output addresses in .cfi_escape, only bytes.  
         Other codes have no operands.  
void output_loc_sequence ( )
   Output a sequence of location operations.  
   The for_eh_or_skip parameter controls whether register numbers are
   converted using DWARF2_FRAME_REG_OUT, which is needed in the case that
   hard reg numbers have been processed via DWARF_FRAME_REGNUM (i.e. for unwind
   info).  This should be suppressed for the cases that have not been converted
   (i.e. symbolic debug info), by setting the parameter < 0.  See PR47324.  
         Output the opcode.  
         Output the operand(s) (if any).  

Referenced by size_of_aranges().

static void output_location_lists ( dw_die_ref  )
static
static void output_location_lists ( )
static
   Output all location lists for the DIE and its children.  
static void output_macinfo ( )
static
   Output macinfo section(s).  
     output_macinfo* uses these interchangeably.  
     For .debug_macro emit the section header.  
     In the first loop, it emits the primary .debug_macinfo section
     and after each emitted op the macinfo_entry is cleared.
     If a longer range of define/undef ops can be optimized using
     DW_MACRO_GNU_transparent_include, the
     DW_MACRO_GNU_transparent_include op is emitted and kept in
     the vector before the first define/undef in the range and the
     whole range of define/undef ops is not emitted and kept.  
             A dummy entry may be inserted at the beginning to be able
             to optimize the whole block of predefined macros.  
     If any DW_MACRO_GNU_transparent_include were used, on those
     DW_MACRO_GNU_transparent_include entries terminate the
     current chain and switch to a new comdat .debug_macinfo
     section and emit the define/undef entries within it.  
             Terminate the previous .debug_macinfo section.  
static void output_macinfo_op ( )
static
   Output a single .debug_macinfo entry.  
static void output_one_line_info_table ( )
static
   Output one line number table into the .debug_line section.  
             ??? Unfortunately, we have little choice here currently, and
             must always use the most general form.  GCC does not know the
             address delta itself, so we can't use DW_LNS_advance_pc.  Many
             ports do have length attributes which will give an upper bound
             on the address range.  We could perhaps use length attributes
             to determine when it is safe to use DW_LNS_fixed_advance_pc.  
             This can handle any delta.  This takes
             4+DWARF2_ADDR_SIZE bytes.  
                 We still need to start a new row, so output a copy insn.  
                     This can handle deltas from -10 to 234, using the current
                     definitions of DWARF_LINE_BASE and DWARF_LINE_RANGE.
                     This takes 1 byte.  
                     This can handle any delta.  This takes at least 4 bytes,
                     depending on the value being encoded.  
     Emit debug info for the address of the end of the table.  

References add_AT_flag(), generic_parameter_die(), lang_hooks_for_types::get_argument_pack_elems, lang_hooks::get_innermost_generic_args, lang_hooks::get_innermost_generic_parms, int_cst_value(), lookup_decl_die(), lookup_type_die(), template_parameter_pack_die(), and lang_hooks::types.

static void output_pubname ( )
static
   Output a single entry in the pubnames table.  
         This logic follows gdb's method for determining the value of the flag
         byte.  
             An unusual tag.  Leave the flag-byte empty.  
static void output_pubnames ( vec< pubname_entry, va_gc > *  )
static
static void output_pubnames ( )
static
   Output the public names table used to speed up access to externally
   visible names; or the public types table used to find type definitions.  
     Version number for pubnames/pubtypes is independent of dwarf version.  
             We shouldn't see pubnames for DIEs outside of the main CU.  
             If we're putting types in their own .debug_types sections,
             the .debug_pubtypes table will still point to the compile
             unit (not the type unit), so we want to use the offset of
             the skeleton DIE (if there is one).  
static void output_pubtables ( )
static
   Output public names and types tables if necessary.  
     ??? Only defined by DWARF3, but emitted by Darwin for DWARF2.
     It shouldn't hurt to emit it always, since pure DWARF2 consumers
     simply won't look for the section.  
static void output_range_list_offset ( )
static
   Output a range_list offset into the debug_range section.  Emit a
   relocated reference if val_entry is NULL, otherwise, emit an
   indirect reference.  

Referenced by size_of_aranges().

static void output_ranges ( void  )
static
             If all code is in the text section, then the compilation
             unit base address defaults to DW_AT_low_pc, which is the
             base of the text section.  
             Otherwise, the compilation unit base address is zero,
             which allows us to use absolute addresses, and not worry
             about whether the target supports cross-section
             arithmetic.  
         Negative block_num stands for an index into ranges_by_label.  
                 If we ever use add_ranges_by_labels () for a single
                 function section, all we have to do is to take out
                 the #if 0 above.  

References dw2_asm_output_data().

static void output_signature ( )
inlinestatic
   Output a type signature.  
static void output_skeleton_debug_sections ( )
static
   Output skeleton debug sections that point to the dwo file.  
     These attributes will be found in the full debug_info section.  
     Produce the skeleton compilation-unit header.  This one differs enough from
     a normal CU header that it's better not to call output_compilation_unit
     header.  
     Build the skeleton debug_abbrev section.  
static void output_value_format ( dw_attr_ref  )
static
static void output_value_format ( )
static
   Output the encoding of an attribute value.  
static dw_loc_descr_ref parameter_ref_descriptor ( )
static
   Helper function for mem_loc_descriptor.  Return DW_OP_GNU_parameter_ref
   for DEBUG_PARAMETER_REF RTL.  
static dw_die_ref pop_compile_unit ( dw_die_ref  )
static

Referenced by same_die_p().

static dw_die_ref pop_compile_unit ( )
static
   Close an include-file CU and reopen the enclosing one.  
static void pop_decl_scope ( )
inlinestatic
   Pop a declaration scope.  
static dw_loc_descr_ref popcount_loc_descriptor ( rtx  rtl,
enum machine_mode  mode,
enum machine_mode  mem_mode 
)
static
   POPCOUNT (const0 is DW_OP_lit0 or corresponding typed constant,
   const1 is DW_OP_lit1 or corresponding typed constant):
       const0 DW_OP_swap
   L1: DW_OP_dup DW_OP_bra <L2> DW_OP_dup DW_OP_rot const1 DW_OP_and
       DW_OP_plus DW_OP_swap const1 DW_OP_shr DW_OP_skip <L1>
   L2: DW_OP_drop

   PARITY is similar:
   L1: DW_OP_dup DW_OP_bra <L2> DW_OP_dup DW_OP_rot const1 DW_OP_and
       DW_OP_xor DW_OP_swap const1 DW_OP_shr DW_OP_skip <L1>
   L2: DW_OP_drop  
static void premark_types_used_by_global_vars ( )
static
   Mark all members of types_used_by_vars_entry as perennial.  

References inlined_function_outer_scope_p().

static int premark_types_used_by_global_vars_helper ( void **  slot,
void *  data 
)
static
   Helper function of premark_types_used_by_global_vars which gets called
   through htab_traverse.

   Marks the DIE of a given type in *SLOT as perennial, so it never gets
   marked as unused by prune_unused_types. The DIE of the type is marked
   only if the global variable using the type will actually be emitted.  
         Ask cgraph if the global variable really is to be emitted.
         If yes, then we'll keep the DIE of ENTRY->TYPE.  
             Keep the parent DIEs as well.  
static void premark_used_types ( )
static
   Mark all members of used_types_hash as perennial.  

Referenced by gen_array_type_die().

static int premark_used_types_helper ( )
static
   Helper function of premark_used_types() which gets called through
   htab_traverse.

   Marks the DIE of a given type in *SLOT as perennial, so it never gets
   marked as unused by prune_unused_types.  
static void print_die ( dw_die_ref  ,
FILE *   
)
static
static void print_die ( )
static
   Print the information associated with a given DIE, and its children.
   This routine is a debugging aid only.  
static void print_signature ( )
inlinestatic
   Print a type signature in hex.  
static void print_spaces ( FILE *  )
static

Referenced by decl_piece_varloc_ptr().

static void print_spaces ( )
inlinestatic
   Indent the line the number of spaces given by print_indent.  
static void process_scope_var ( )
static
   Process variable DECL (or variable with origin ORIGIN) within
   block STMT and add it to CONTEXT_DIE.  
static void prune_unmark_dies ( dw_die_ref  )
static
static void prune_unmark_dies ( )
static
   Clear the marks for a die and its children.
   Be cool if the mark isn't set.  
static void prune_unused_types ( )
static
   Remove dies representing declarations that we never use.  
     All the marks should already be clear.  
     Mark types that are used in global variables.  
     Set the mark on nodes that are actually used.  
     Also set the mark on nodes referenced from the pubname_table.  Enumerators
     are unusual in that they are pubnames that are the children of pubtypes.
     They should only be marked via their parent DW_TAG_enumeration_type die,
     not as roots in themselves.  
     Leave the marks clear.  

References add_child_die(), comp_unit_die(), limbo_die_struct::created_for, get_context_die(), and scope_die_for().

static void prune_unused_types_mark ( dw_die_ref  ,
int   
)
static

Referenced by dwarf2out_end_function().

static void prune_unused_types_mark ( )
static
   Mark DIE as being used.  If DOKIDS is true, then walk down
   to DIE's children.  
         We haven't done this node yet.  Mark it as used.  
         If this is the DIE of a generic type instantiation,
         mark the children DIEs that describe its generic parms and
         args.  
         We also have to mark its parents as used.
         (But we don't want to mark our parent's kids due to this,
         unless it is a class.)  
         Mark any referenced nodes.  
         If this node is a specification,
         also mark the definition, if it exists.  
         We need to walk the children, but haven't done so yet.
         Remember that we've walked the kids.  
         If this is an array type, we need to make sure our
         kids get marked, even if they're types.  If we're
         breaking out types into comdat sections, do this
         for all type definitions.  
static void prune_unused_types_mark_generic_parms_dies ( dw_die_ref  )
static
static void prune_unused_types_mark_generic_parms_dies ( )
static
   Mark the generic parameters and arguments children DIEs of DIE.  
static void prune_unused_types_prune ( dw_die_ref  )
static
static void prune_unused_types_prune ( )
static
   Remove from the tree DIE any dies that aren't marked.  
             No marked children between 'prev' and the end of the list.  
               No marked children at all.  

References add_comp_dir_attribute(), comp_unit_die(), file_table, and file_table_relative_p().

static void prune_unused_types_update_strings ( )
static
   Increment the string counts on strings referred to from DIE's
   attributes.  
           Avoid unnecessarily putting strings that are used less than
           twice in the hash table.  

Referenced by dwarf2out_begin_function().

static void prune_unused_types_walk ( dw_die_ref  )
static

Referenced by dwarf2out_end_function().

static void prune_unused_types_walk ( )
static
   Walk the tree DIE and mark types that we actually use.  
     Don't do anything if this node is already marked and
     children have been marked as well.  
         Finding used static member functions inside of classes
         is needed just for local classes, because for other classes
         static member function DIEs with DW_AT_specification
         are emitted outside of the DW_TAG_*_type.  If we ever change
         it, we'd need to call this even for non-local classes.  
         It's a type node --- don't mark it.  
         It's a type node --- don't mark it.  
         Mark everything else.  
         Now, mark any dies referenced from here.  
     Mark children.  
static void prune_unused_types_walk_attribs ( dw_die_ref  )
static
static void prune_unused_types_walk_attribs ( )
static
   Given DIE that we're marking as used, find any other dies
   it references as attributes and mark them as used.  
             A reference to another DIE.
             Make sure that it will get emitted.
             If it was broken out into a comdat group, don't follow it.  
         Set the string's refcount to 0 so that prune_unused_types_mark
         accounts properly for it.  
static void prune_unused_types_walk_local_classes ( )
static
   For local classes, look if any static member functions were emitted
   and if so, mark them.  
     Mark children.  

References compare_loc_operands(), dw_loc_descr_struct::dtprel, and dw_loc_descr_struct::dw_loc_next.

static void push_decl_scope ( tree  )
static
static void push_decl_scope ( )
static
   Push a new declaration scope.  
static void push_dw_line_info_entry ( dw_line_info_table table,
enum dw_line_info_opcode  opcode,
unsigned int  val 
)
static
   Add OPCODE+VAL as an entry at the end of the opcode array in TABLE.  
static dw_die_ref push_new_compile_unit ( dw_die_ref  ,
dw_die_ref   
)
static

Referenced by same_die_p().

static dw_die_ref push_new_compile_unit ( )
static
   Start a new compilation unit DIE for an include file.  OLD_UNIT is the CU
   for the enclosing include file, if any.  BINCL_DIE is the DW_TAG_GNU_BINCL
   DIE that marks the start of the DIEs for this include file.  
static void record_comdat_symbol_number ( dw_die_ref  cu,
cu_hash_type  htable,
unsigned int  sym_num 
)
static
   Record SYM_NUM to record of CU in HTABLE.  
static enum dwarf_tag record_type_tag ( )
static
static tree reference_to_unused ( tree tp,
int *  walk_subtrees,
void *  data 
)
static
   Determine whether the evaluation of EXPR references any variables
   or functions which aren't otherwise used (and therefore may not be
   output).  
     ???  The C++ FE emits debug information for using decls, so
     putting gcc_unreachable here falls over.  See PR31899.  For now
     be conservative.  
         The call graph machinery must have finished analyzing,
         optimizing and gimplifying the CU by now.
         So if *TP has no call graph node associated
         to it, it means *TP will not be emitted.  
static dw_loc_descr_ref reg_loc_descriptor ( rtx  ,
enum  var_init_status 
)
static
static dw_loc_descr_ref reg_loc_descriptor ( )
static
   Return a location descriptor that designates a machine register or
   zero if there is none.  
     We only use "frame base" when we're sure we're talking about the
     post-prologue local stack frame.  We do this by *not* running
     register elimination until this point, and recognizing the special
     argument pointer and soft frame pointer rtx's.
     Use DW_OP_fbreg offset DW_OP_stack_value in this case.  

References add_loc_descr(), base_type_for_mode(), compare_loc_descriptor(), dw_val_struct::dw_val_struct_union::dw_val_die_union::die, dw_loc_descr_struct::dw_loc_oprnd1, dw_val_class_die_ref, dw_val_struct::dw_val_struct_union::dw_val_die_union::external, mem_loc_descriptor(), new_loc_descr(), shift, dw_val_struct::v, dw_val_struct::val_class, dw_val_struct::dw_val_struct_union::val_die_ref, and VAR_INIT_STATUS_INITIALIZED.

static void remove_addr_table_entry ( addr_table_entry )
static
static void remove_addr_table_entry ( )
static
   Remove an entry from the addr table by decrementing its refcount.
   Strictly, decrementing the refcount would be enough, but the
   assertion that the entry is actually in the table has found
   bugs.  
     After an index is assigned, the table is frozen.  
static void remove_AT ( dw_die_ref  ,
enum  dwarf_attribute 
)
static
static void remove_AT ( )
static
   Remove the specified attribute if present.  
           vec::ordered_remove should help reduce the number of abbrevs
           that are needed.  

References decl_die_table, and die_struct::decl_id.

static dw_die_ref remove_child_or_replace_with_skeleton ( dw_die_ref  unit,
dw_die_ref  child,
dw_die_ref  prev 
)
static
   Remove the CHILD DIE from its parent, possibly replacing it with a cloned
   declaration.  The original DIE is moved to a new compile unit so that
   existing references to it follow it to the new location.  If any of the
   original DIE's descendants is a declaration, we need to replace the
   original DIE with a skeleton tree and move the declarations back into the
   skeleton tree.  
     Copy the declaration context to the type unit DIE.  If the returned
     ORIG_PARENT is not NULL, the skeleton needs to be added as a child of
     that DIE.  
         If the original DIE was a specification, we need to put
         the skeleton under the parent DIE of the declaration.
         This leaves the original declaration in the tree, but
         it will be pruned later since there are no longer any
         references to it.  

References AT_ref(), change_AT_die_ref(), lookup_external_ref(), set_AT_ref_external(), and external_ref::stub.

Referenced by should_move_die_to_comdat().

static void remove_child_TAG ( dw_die_ref  ,
enum  dwarf_tag 
)
static

Referenced by gen_array_type_die().

static void remove_child_TAG ( )
static
   Remove child DIE whose die_tag is TAG.  Do nothing if no child
   matches TAG.  
           Might have removed every child.  

References decl_piece_bitsize(), decl_piece_node(), and decl_piece_varloc_ptr().

static void remove_child_with_prev ( )
static
   Remove CHILD from its parent.  PREV must have the property that
   PREV->DIE_SIB == CHILD.  Does not alter CHILD.  

Referenced by add_AT_range_list(), break_out_includes(), contains_subprogram_definition(), and same_die_p().

static void remove_loc_list_addr_table_entries ( )
static
   Given a location list, remove all addresses it refers to from the
   address_table.  
static void replace_child ( )
static
   Replace OLD_CHILD with NEW_CHILD.  PREV must have the property that
   PREV->DIE_SIB == OLD_CHILD.  Does not alter OLD_CHILD.  

Referenced by break_out_includes().

static void resolve_addr ( )
static
   Resolve DW_OP_addr and DW_AT_const_value CONST_STRING arguments to
   an address in .rodata section if the string literal is emitted there,
   or remove the containing location list or replace DW_AT_const_value
   with DW_AT_location and empty location expression, if it isn't found
   in .rodata.  Similarly for SYMBOL_REFs, keep only those that refer
   to something that has been emitted in the current CU.  
           The same list can be referenced more than once.  See if we have
           already recorded the result from a previous pass.  
               As things stand, we do not expect or allow one die to
               reference a suffix of another die's location list chain.
               References must be identical or completely separate.
               There is therefore no need to cache the result of this
               pass on any list other than the first; doing so
               would lead to unnecessary writes.  
             For -gdwarf-2 don't attempt to optimize
             DW_AT_data_member_location containing
             DW_OP_plus_uconst - older consumers might
             rely on it being that op instead of a more complex,
             but shorter, location description.  
static bool resolve_addr_in_expr ( )
static
   Helper function for resolve_addr, handle one location
   expression, return false if at least one CONST_STRING or SYMBOL_REF in
   the location list couldn't be resolved.  
                   Optimize away next DW_OP_GNU_convert after
                   adjusting LOC's base type die reference.  
               Don't change integer DW_OP_GNU_convert after e.g. floating
               point typed stack entry.  
static int resolve_one_addr ( rtx ,
void *   
)
static
static int resolve_one_addr ( )
static
   Helper function for resolve_addr, attempt to resolve
   one CONST_STRING, return non-zero if not successful.  Similarly verify that
   SYMBOL_REFs refer to variables emitted in the current CU.  
static void retry_incomplete_types ( )
static
   Walk through the list of incomplete types again, trying once more to
   emit full debugging info for them.  

References add_AT_loc(), new_loc_descr(), and targetm.

static dw_loc_descr_ref rotate_loc_descriptor ( rtx  rtl,
enum machine_mode  mode,
enum machine_mode  mem_mode 
)
static
   ROTATE (constMASK is mode mask, BITSIZE is bitsize of mode):
   DW_OP_over DW_OP_over DW_OP_shl [ constMASK DW_OP_and ] DW_OP_rot
   [ DW_OP_swap constMASK DW_OP_and DW_OP_swap ] DW_OP_neg
   DW_OP_plus_uconst <BITSIZE> DW_OP_shr DW_OP_or

   ROTATERT is similar:
   DW_OP_over DW_OP_over DW_OP_neg DW_OP_plus_uconst <BITSIZE>
   DW_OP_shl [ constMASK DW_OP_and ] DW_OP_rot
   [ DW_OP_swap constMASK DW_OP_and DW_OP_swap ] DW_OP_shr DW_OP_or  
static double_int round_up_to_align ( )
inlinestatic
   Return the result of rounding T up to ALIGN.  
static rtx rtl_for_decl_init ( )
static
   Generate an RTL constant from a decl initializer INIT with decl type TYPE,
   for use in a later add_const_value_attribute call.  
     If a variable is initialized with a string constant without embedded
     zeros, build CONST_STRING.  
     Other aggregates, and complex values, could be represented using
     CONCAT: FIXME!  
     Vectors only work if their mode is supported by the target.
     FIXME: generic vectors ought to work too.  
     If the initializer is something that we know will expand into an
     immediate RTL constant, expand it now.  We must be careful not to
     reference variables which won't be output.  
         Convert vector CONSTRUCTOR initializers to VECTOR_CST if
         possible.  
                   Even when ctor is constant, it might contain non-*_CST
                   elements (e.g. { 1.0/0.0 - 1.0/0.0, 0.0 }) and those don't
                   belong into VECTOR_CST nodes.  
               FALLTHRU 
         If expand_expr returns a MEM, it wasn't immediate.  

Referenced by insert_float().

static rtx rtl_for_decl_location ( tree  )
static
static rtx rtl_for_decl_location ( )
static
   Generate RTL for the variable DECL to represent its location.  
     Here we have to decide where we are going to say the parameter "lives"
     (as far as the debugger is concerned).  We only have a couple of
     choices.  GCC provides us with DECL_RTL and with DECL_INCOMING_RTL.

     DECL_RTL normally indicates where the parameter lives during most of the
     activation of the function.  If optimization is enabled however, this
     could be either NULL or else a pseudo-reg.  Both of those cases indicate
     that the parameter doesn't really live anywhere (as far as the code
     generation parts of GCC are concerned) during most of the function's
     activation.  That will happen (for example) if the parameter is never
     referenced within the function.

     We could just generate a location descriptor here for all non-NULL
     non-pseudo values of DECL_RTL and ignore all of the rest, but we can be
     a little nicer than that if we also consider DECL_INCOMING_RTL in cases
     where DECL_RTL is NULL or is a pseudo-reg.

     Note however that we can only get away with using DECL_INCOMING_RTL as
     a backup substitute for DECL_RTL in certain limited cases.  In cases
     where DECL_ARG_TYPE (decl) indicates the same type as TREE_TYPE (decl),
     we can be sure that the parameter was passed using the same type as it is
     declared to have within the function, and that its DECL_INCOMING_RTL
     points us to a place where a value of that type is passed.

     In cases where DECL_ARG_TYPE (decl) and TREE_TYPE (decl) are different,
     we cannot (in general) use DECL_INCOMING_RTL as a substitute for DECL_RTL
     because in these cases DECL_INCOMING_RTL points us to a value of some
     type which is *different* from the type of the parameter itself.  Thus,
     if we tried to use DECL_INCOMING_RTL to generate a location attribute in
     such cases, the debugger would end up (for example) trying to fetch a
     `float' from a place which actually contains the first part of a
     `double'.  That would lead to really incorrect and confusing
     output at debug-time.

     So, in general, we *do not* use DECL_INCOMING_RTL as a backup for DECL_RTL
     in cases where DECL_ARG_TYPE (decl) != TREE_TYPE (decl).  There
     are a couple of exceptions however.  On little-endian machines we can
     get away with using DECL_INCOMING_RTL even when DECL_ARG_TYPE (decl) is
     not the same as TREE_TYPE (decl), but only when DECL_ARG_TYPE (decl) is
     an integral type that is smaller than TREE_TYPE (decl). These cases arise
     when (on a little-endian machine) a non-prototyped function has a
     parameter declared to be of type `short' or `char'.  In such cases,
     TREE_TYPE (decl) will be `short' or `char', DECL_ARG_TYPE (decl) will
     be `int', and DECL_INCOMING_RTL will point to the lowest-order byte of the
     passed `int' value.  If the debugger then uses that address to fetch
     a `short' or a `char' (on a little-endian machine) the result will be
     the correct data, so we allow for such exceptional cases below.

     Note that our goal here is to describe the place where the given formal
     parameter lives during most of the function's activation (i.e. between the
     end of the prologue and the start of the epilogue).  We'll do that as best
     as we can. Note however that if the given formal parameter is modified
     sometime during the execution of the function, then a stack backtrace (at
     debug-time) will show the function as having been called with the *new*
     value rather than the value which was originally passed in.  This happens
     rarely enough that it is not a major problem, but it *is* a problem, and
     I'd like to fix it.

     A future version of dwarf2out.c may generate two additional attributes for
     any given DW_TAG_formal_parameter DIE which will describe the "passed
     type" and the "passed location" for the given formal parameter in addition
     to the attributes we now generate to indicate the "declared type" and the
     "active location" for each parameter.  This additional set of attributes
     could be used by debuggers for stack backtraces. Separately, note that
     sometimes DECL_RTL can be NULL and DECL_INCOMING_RTL can be NULL also.
     This happens (for example) for inlined-instances of inline function formal
     parameters which are never referenced.  This really shouldn't be
     happening.  All PARM_DECL nodes should get valid non-NULL
     DECL_INCOMING_RTL values.  FIXME.  
     Use DECL_RTL as the "location" unless we find something better.  
     When generating abstract instances, ignore everything except
     constants, symbols living in memory, and symbols living in
     fixed registers.  
             This decl represents a formal parameter which was optimized out.
             Note that DECL_INCOMING_RTL may be NULL in here, but we handle
             all cases where (rtl == NULL_RTX) just below.  
         If the parm was passed in registers, but lives on the stack, then
         make a big endian correction if the mode of the type of the
         parameter is not the same as the mode of the rtl.  
         ??? This is the same series of checks that are made in dbxout.c before
         we reach the big endian correction code there.  It isn't clear if all
         of these checks are necessary here, but keeping them all is the safe
         thing to do.  
                  Not passed in memory.  
                  Not passed by invisible reference.  
                  Big endian correction check.  
         If a variable is declared "register" yet is smaller than
         a register, then if we store the variable to memory, it
         looks like we're storing a register-sized value, when in
         fact we are not.  We need to adjust the offset of the
         storage location to reflect the actual value's bytes,
         else gdb will not be able to display it.  
     A variable with no DECL_RTL but a DECL_INITIAL is a compile-time constant,
     and will have been substituted directly into all expressions that use it.
     C does not have such a concept, but C++ and other languages do.  
     If we don't look past the constant pool, we risk emitting a
     reference to a constant pool entry that isn't referenced from
     code, and thus is not emitted.  
     Try harder to get a rtl.  If this symbol ends up not being emitted
     in the current CU, resolve_addr will remove the expression referencing
     it.  
static int same_attr_p ( dw_attr_ref  ,
dw_attr_ref  ,
int *   
)
static
static int same_attr_p ( )
static
   Do the attributes look the same?  
     We don't care that this was compiled with a different compiler
     snapshot; if the output is the same, that's what matters. 
static int same_die_p ( dw_die_ref  ,
dw_die_ref  ,
int *   
)
static
static int same_die_p ( )
static
static int same_die_p_wrap ( dw_die_ref  ,
dw_die_ref   
)
static
static int same_die_p_wrap ( )
static
   Do the dies look the same?  Wrapper around same_die_p.  

References die_struct::die_attr, and dw_attr_struct::dw_attr.

static int same_dw_val_p ( const dw_val_node ,
const dw_val_node ,
int *   
)
static
static int same_dw_val_p ( )
static
   Do the values look the same?  
static int same_loc_p ( dw_loc_descr_ref  ,
dw_loc_descr_ref  ,
int *   
)
static
static int same_loc_p ( )
inlinestatic
   Do the location expressions look same?  
static void save_macinfo_strings ( )
static
   Save any strings needed by the macinfo table in the debug str
   table.  All strings must be collected into the table by the time
   index_string is called.  
             Match the logic in output_macinfo_op to decide on
             indirect strings.  
static void schedule_generic_params_dies_gen ( tree  t)
static
static void schedule_generic_params_dies_gen ( )
static
   Schedule the generation of the generic parameter dies for the
  instance of generic type T. The proper generation itself is later
  done by gen_scheduled_generic_parms_dies. 

References dw2_asm_output_data(), indirect_string_node::form, indirect_string_node::index, indirect_string_node::refcount, indirect_string_node::str, and strlen().

static dw_loc_descr_ref scompare_loc_descriptor ( enum dwarf_location_atom  op,
rtx  rtl,
enum machine_mode  mem_mode 
)
static
   Return location descriptor for signed comparison OP RTL.  
     For eq/ne, if the operands are known to be zero-extended,
     there is no need to do the fancy shifting up.  
         deref_size zero extends, and for constants we can check
         whether they are zero extended or not.  
         EQ/NE comparison against constant in narrower type than
         DWARF2_ADDR_SIZE can be performed either as
         DW_OP_const1u <shift> DW_OP_shl DW_OP_const* <cst << shift>
         DW_OP_{eq,ne}
         or
         DW_OP_const*u <mode_mask> DW_OP_and DW_OP_const* <cst & mode_mask>
         DW_OP_{eq,ne}.  Pick whatever is shorter.  

References add_loc_descr(), base_type_for_mode(), dw_val_struct::dw_val_struct_union::dw_val_die_union::die, dw_loc_descr_struct::dw_loc_oprnd1, dw_val_class_die_ref, dw_val_struct::dw_val_struct_union::dw_val_die_union::external, mem_loc_descriptor(), new_loc_descr(), subreg_lowpart_p(), targetm, dw_val_struct::v, dw_val_struct::val_class, and dw_val_struct::dw_val_struct_union::val_die_ref.

static dw_die_ref scope_die_for ( )
static
   Return the DIE for the scope that immediately contains this type.
   Non-named types that do not involve a function-local type get global
   scope.  Named types nested in namespaces or other types get their
   containing scope.  All other types (i.e. function-local named types) get
   the current active scope.  
     Non-types always go in the current scope.  
     Use the scope of the typedef, rather than the scope of the type
     it refers to.  
     Use the containing namespace if there is one.  
           OK 
     Ignore function type "scopes" from the C frontend.  They mean that
     a tagged type is local to a parmlist of a function declarator, but
     that isn't useful to DWARF.  
         If T uses a local type keep it local as well, to avoid references
         to function-local DIEs from outside the function.  
         For types, we can just look up the appropriate DIE.  

References set_block_origin_self().

static const char* secname_for_decl ( )
static
   We need to figure out what section we should use as the base for the
   address ranges where a given location is valid.
   1. If this particular DECL has a section associated with it, use that.
   2. If this function has a section associated with it, use that.
   3. Otherwise, use the text section.
   XXX: If you split a variable across multiple sections, we won't notice.  
static void set_AT_ref_external ( dw_attr_ref  ,
int   
)
inlinestatic
static void set_block_abstract_flags ( )
static
   Given a pointer to some BLOCK node, and a boolean value to set the
   "abstract" flags to, set that value into the BLOCK_ABSTRACT flag for
   the given block, and for all local decls and all local sub-blocks
   (recursively) which are contained therein.  

Referenced by local_scope_p().

static void set_block_origin_self ( )
static
   Given a pointer to some BLOCK node, if the BLOCK_ABSTRACT_ORIGIN for the
   given BLOCK node is NULL, set the BLOCK_ABSTRACT_ORIGIN for the node so
   that it points to the node itself, thus indicating that the node is its
   own (abstract) origin.  Additionally, if the BLOCK_ABSTRACT_ORIGIN for
   the given node is NULL, recursively descend the decl/block tree which
   it is the root of, and for each other ..._DECL or BLOCK node contained
   therein whose DECL_ABSTRACT_ORIGINs or BLOCK_ABSTRACT_ORIGINs are also
   still NULL, set *their* DECL_ABSTRACT_ORIGIN or BLOCK_ABSTRACT_ORIGIN
   values to point to themselves.  

Referenced by scope_die_for().

static void set_cur_line_info_table ( section )
static
static void set_cur_line_info_table ( )
static
   Lookup the "current" table into which we emit line info, so
   that we don't have to do it for every source line.  
static void set_decl_abstract_flags ( tree  ,
int   
)
static
static void set_decl_abstract_flags ( )
static
   Given a pointer to some ..._DECL node, and a boolean value to set the
   "abstract" flags to, set that value into the DECL_ABSTRACT flag for the
   given decl, and (in the case where the decl is a FUNCTION_DECL) also
   set the abstract flags for all of the parameters, local vars, local
   blocks and sub-blocks (recursively) to the same setting.  
static void set_decl_origin_self ( tree  )
static
   Forward declare these functions, because they are mutually recursive
  with their set_block_* pairing functions.  
static void set_decl_origin_self ( )
static
   Given a pointer to some ..._DECL node, if the DECL_ABSTRACT_ORIGIN for
   the given ..._DECL node is NULL, set the DECL_ABSTRACT_ORIGIN for the
   node to so that it points to the node itself, thus indicating that the
   node represents its own (abstract) origin.  Additionally, if the
   DECL_ABSTRACT_ORIGIN for the given node is NULL, recursively descend
   the decl/block tree of which the given node is the root of, and for
   each other ..._DECL or BLOCK node contained therein whose
   DECL_ABSTRACT_ORIGINs or BLOCK_ABSTRACT_ORIGINs are also still NULL,
   set *their* DECL_ABSTRACT_ORIGIN or BLOCK_ABSTRACT_ORIGIN values to
   point to themselves.  

References dw_loc_descr_struct::dw_loc_oprnd1, dw_loc_list_struct::expr, plus_constant(), dw_val_struct::v, and dw_val_struct::dw_val_struct_union::val_addr.

static void set_indirect_string ( )
static
   Call this function directly to bypass AT_string_form's logic to put
   the string inline in the die. 
     Already indirect is a no op.  

Referenced by dwarf2out_decl().

static dw_die_ref setup_namespace_context ( tree  ,
dw_die_ref   
)
static
static dw_die_ref setup_namespace_context ( )
static
   Force out any required namespaces to be able to output DECL,
   and return the new context_die for it, if it's changed.  
       Force out the namespace.  
static bool should_emit_struct_debug ( )
static
static int should_move_die_to_comdat ( dw_die_ref  )
static
static int should_move_die_to_comdat ( )
static
   Return non-zero if this is a type DIE that should be moved to a
   COMDAT .debug_types section.  
         Don't move declarations, inlined instances, or types nested in a
         subprogram.  
         A type definition should never contain a subprogram definition.  

References add_AT_unsigned(), break_out_comdat_types(), comdat_type_list, comp_unit_die(), die_struct::die_child, die_struct::die_sib, first, generate_type_signature(), get_AT_unsigned(), new_die(), comdat_type_struct::next, remove_child_or_replace_with_skeleton(), comdat_type_struct::root_die, should_move_die_to_comdat(), and comdat_type_struct::skeleton_die.

static unsigned int simple_decl_align_in_bits ( const_tree  )
static
static unsigned simple_decl_align_in_bits ( )
inlinestatic

References get_address_mode().

static unsigned int simple_type_align_in_bits ( const_tree  )
static
static unsigned simple_type_align_in_bits ( )
inlinestatic
   Given a pointer to a tree node, return the alignment in bits for
   it, or else return BITS_PER_WORD if the node actually turns out to
   be an ERROR_MARK node.  
static unsigned HOST_WIDE_INT simple_type_size_in_bits ( const_tree  )
static
static unsigned HOST_WIDE_INT simple_type_size_in_bits ( )
inlinestatic
   Given a pointer to a tree node, assumed to be some kind of a ..._TYPE
   node, return the size in bits for the type if it is a constant, or else
   return the alignment for the type if the type's size is not constant, or
   else return BITS_PER_WORD if the type actually turns out to be an
   ERROR_MARK node.  
static bool single_element_loc_list_p ( )
static
   Return if the loc_list has only single element and thus can be represented
   as location description.   

Referenced by loc_list_from_tree().

static unsigned long size_of_aranges ( )
static
static unsigned long size_of_die ( dw_die_ref  )
static
static unsigned long size_of_die ( )
static
   Return the size of a DIE as it is represented in the
   .debug_info section.  
               Block length.  
               Currently all add_AT_flag calls pass in 1 as last argument,
               so DW_FORM_flag_present can be used.  If that ever changes,
               we'll need to use DW_FORM_flag and have some optimization
               in build_abbrev_table that will change those to
               DW_FORM_flag_present if it is set to 1 in all DIEs using
               the same abbrev entry.  
                 In DWARF4, we use DW_FORM_ref_sig8; for earlier versions
                 we use DW_FORM_ref_addr.  In DWARF2, DW_FORM_ref_addr
                 is sized by target address length, whereas in DWARF3
                 it's always sized as an offset.  
static unsigned long size_of_int_loc_descriptor ( HOST_WIDE_INT  )
static

Referenced by modified_type_die().

static unsigned long size_of_int_loc_descriptor ( )
static
   Return size_of_locs (int_loc_descriptor (i)) without
   actually allocating it.  
static unsigned long size_of_int_shift_loc_descriptor ( )
static
   Return size_of_locs (int_shift_loc_descriptor (i, shift))
   without actually allocating it.  
static unsigned long size_of_loc_descr ( )
static
   Return the size of a location descriptor.  
unsigned long size_of_locs ( )
   Return the size of a series of location descriptors.  
     If there are no skip or bra opcodes, don't fill in the dw_loc_addr
     field, to avoid writing to a PCH file.  

Referenced by clone_tree_hash(), and size_of_aranges().

static unsigned long size_of_pubnames ( vec< pubname_entry, va_gc > *  )
static
static void splice_child_die ( dw_die_ref  ,
dw_die_ref   
)
static
static void splice_child_die ( )
static
   Move CHILD, which must be a child of PARENT or the DIE for which PARENT
   is the specification, to the end of PARENT's list of children.
   This is done by removing and re-adding it.  
     We want the declaration DIE from inside the class, not the
     specification DIE at toplevel.  
static rtx string_cst_pool_decl ( )
static
   For STRING_CST, return SYMBOL_REF of its constant pool entry,
   if possible, and create DW_TAG_dwarf_procedure that can be referenced
   from DW_OP_GNU_implicit_pointer if the string hasn't been seen yet.  
static dw_die_ref strip_naming_typedef ( tree  ,
dw_die_ref   
)
static
static dw_die_ref strip_naming_typedef ( )
inlinestatic
   Given a TYPE_DIE representing the type TYPE, if TYPE is an
   anonymous type named by the typedef TYPE_DIE, return the DIE of the
   anonymous type instead the one of the naming typedef.  

References construct_piece_list(), var_loc_list_def::first, var_loc_list_def::last, var_loc_node::loc, and var_loc_node::next.

static char* stripattributes ( const char *  )
static
   Forward declarations for functions defined in this file.  
static char* stripattributes ( )
inlinestatic
   Return a pointer to a copy of the section string name S with all
   attributes stripped off, and an asterisk prepended (for assemble_name).  
static dw_die_ref subrange_type_die ( tree  ,
tree  ,
tree  ,
dw_die_ref   
)
static
static dw_die_ref subrange_type_die ( )
static
    Given a pointer to a tree node for a subrange type, return a pointer
    to a DIE that describes the given type.  
         The size of the subrange type and its base type do not match,
         so we need to generate a size attribute for the subrange type.  
static void switch_to_eh_frame_section ( )
static
   Switch [BACK] to eh_frame_section.  If we don't have an eh_frame_section,
   switch to the data section instead, and write out a synthetic start label
   for collect2 the first time around.  
         We have no special eh_frame section.  Put the information in
         the data section and emit special labels to guide collect2.  
static void switch_to_frame_table_section ( )
static
   Switch [BACK] to the eh or debug frame table section, depending on
   FOR_EH.  
static dw_die_ref template_parameter_pack_die ( tree  parm_pack,
tree  parm_pack_args,
dw_die_ref  parent_die 
)
static
   Generate and return a  DW_TAG_GNU_template_parameter_pack DIE representing.
   PARM_PACK must be a template parameter pack. The returned DIE
   will be child DIE of PARENT_DIE.  

Referenced by output_one_line_info_table().

static dw_loc_descr_ref tls_mem_loc_descriptor ( )
static
   Try to handle TLS MEMs, for which mem_loc_descriptor on XEXP (mem, 0)
   failed.  
static bool tree_add_const_value_attribute ( dw_die_ref  ,
tree   
)
static
static bool tree_add_const_value_attribute ( )
static
   Attach a DW_AT_const_value attribute to DIE. The value of the
   attribute is the const value T.  
     If the host and target are sane, try harder.  
static bool tree_add_const_value_attribute_for_decl ( dw_die_ref  ,
tree   
)
static
static bool tree_add_const_value_attribute_for_decl ( )
static
   Attach a DW_AT_const_value attribute to VAR_DIE. The value of the
   attribute is the const value of T, where T is an integral constant
   variable with static storage duration
   (so it can't be a PARM_DECL or a RESULT_DECL).  
         OK 
     Don't add DW_AT_const_value if abstract origin already has one.  

References comp_unit_die(), current_function_decl, and uses_local_type().

static int type_is_enum ( const_tree  )
static
static int type_is_enum ( )
inlinestatic
   Given a pointer to an arbitrary ..._TYPE tree node, return true if it is
   an enumerated type.  
static tree type_main_variant ( tree  )
static
static tree type_main_variant ( )
inlinestatic
   Return a reference to a type, with its const and volatile qualifiers
   removed.  
     ??? There really should be only one main variant among any group of
     variants of a given type (and all of the MAIN_VARIANT values for all
     members of the group should point to that one type) but sometimes the C
     front-end messes this up for array types, so we work around that bug
     here.  
static const char* type_tag ( const_tree  )
static
static const char* type_tag ( )
static
   Given a tree pointer to a struct, class, union, or enum type node, return
   a pointer to the (string) tag name for the given type, or zero if the type
   was declared without a tag.  
         Find the IDENTIFIER_NODE for the type name.  
         The g++ front end makes the TYPE_NAME of *each* tagged type point to
         a TYPE_DECL node, regardless of whether or not a `typedef' was
         involved.  
             We want to be extra verbose.  Don't call dwarf_name if
             DECL_NAME isn't set.  The default hook for decl_printable_name
             doesn't like that, and in this context it's correct to return
             0, instead of "<anonymous>" or the like.  
         Now get the name as a string, or invent one.  
static dw_loc_descr_ref typed_binop ( enum dwarf_location_atom  op,
rtx  rtl,
dw_die_ref  type_die,
enum machine_mode  mode,
enum machine_mode  mem_mode 
)
static
   Helper function for mem_loc_descriptor.  Perform OP binary op,
   but after converting arguments to type_die, afterwards
   convert back to unsigned.  

References targetm.

Referenced by bswap_loc_descriptor().

static dw_loc_descr_ref ucompare_loc_descriptor ( enum dwarf_location_atom  op,
rtx  rtl,
enum machine_mode  mem_mode 
)
static
   Return location descriptor for unsigned comparison OP RTL.  
         deref_size zero extends, so no need to mask it again.  
         deref_size zero extends, so no need to mask it again.  
static void unmark_all_dies ( dw_die_ref  )
static
static void unmark_all_dies ( )
static
   Clear the marks for a die, its children and referred dies.  

References AT_loc_list(), dw2_asm_output_delta(), dw2_asm_output_offset(), dw_attr_struct::dw_attr, dwarf_attr_name(), and dw_loc_list_struct::ll_symbol.

static void unmark_dies ( dw_die_ref  )
static

Referenced by copy_ancestor_tree().

static void unmark_dies ( )
static
static tree uses_local_type ( )
static
   If TYPE involves a function-local type (including a local typedef to a
   non-local type), returns that type; otherwise returns NULL_TREE.  

Referenced by tree_add_const_value_attribute_for_decl().

static tree uses_local_type_r ( )
static
   walk_tree helper function for uses_local_type, below.  
static enum dwarf_form value_format ( dw_attr_ref  )
static
static enum dwarf_form value_format ( )
static
   Select the encoding of an attribute value.  
         Only very few attributes allow DW_FORM_addr.  
         FALLTHRU 
             In DWARF3 DW_AT_data_member_location with
             DW_FORM_data4 or DW_FORM_data8 is a loclistptr, not
             constant, so we need to use DW_FORM_udata if we need
             a large constant.  
             Currently all add_AT_flag calls pass in 1 as last argument,
             so DW_FORM_flag_present can be used.  If that ever changes,
             we'll need to use DW_FORM_flag and have some optimization
             in build_abbrev_table that will change those to
             DW_FORM_flag_present if it is set to 1 in all DIEs using
             the same abbrev entry.  
static void var_location_switch_text_section ( )
static
   Note in all location lists that text section has changed.  
static int var_location_switch_text_section_1 ( )
static
   Note in one location list that text section has changed.  

References die_struct::die_parent, die_struct::die_perennial_p, and die_struct::die_tag.

static void verify_marks_clear ( )
static
   Verify that all marks are clear.  
int vms_file_stats_name ( const char *  ,
long long *  ,
long *  ,
char *  ,
int *   
)
   Return VMS file date, size, format, version given a name.  
     Allocate and initialize a FAB and NAM structures.  
     Validate filespec syntax and device existence.  
     Find matching filespec.  
     Get the device name and assign an IO channel.  
     Initialize the FIB and fill in the directory id field.  
     Open and close the file to fill in the attributes.  
     Deassign the channel and exit.  
     Allocate and initialize a FAB and NAM structures.  
     Validate filespec syntax and device existence.  
     Find matching filespec.  
     Get the device name and assign an IO channel.  
     Initialize the FIB and fill in the directory id field.  
     Open and close the file to fill in the attributes.  
     Deassign the channel and exit.  
static bool want_pubnames ( )
inlinestatic
   Whether to generate the DWARF accelerator tables in .debug_pubnames
   and .debug_pubtypes.  This is configured per-target, but can be
   overridden by the -gpubnames or -gno-pubnames options.  

References dw2_asm_output_addr(), dw2_asm_output_delta(), dw_fde_struct::dw_fde_begin, and dw_fde_struct::dw_fde_end.

Referenced by output_loc_list().


Variable Documentation

dw_die_ref* abbrev_die_table
static
   A pointer to the base of a list of references to DIE's that
   are uniquely identified by their tag, presence/absence of
   children DIE's, and list of attribute/value pairs.  
unsigned abbrev_die_table_allocated
static
   Number of elements currently allocated for abbrev_die_table.  
unsigned abbrev_die_table_in_use
static
   Number of elements in type_die_table currently in use.  
char abbrev_section_label[MAX_ARTIFICIAL_LABEL_BYTES]
static
htab_t addr_index_table
static
   Table of entries into the .debug_addr section.  
vec<dw_die_ref> base_types
static
vec<dw_die_ref> block_map
static
   Vector mapping block numbers to DW_TAG_{lexical_block,inlined_subroutine}
   DIEs.  

Referenced by member_declared_type().

htab_t cached_dw_loc_list_table
static
   Table of cached location lists.  
rtx cached_next_real_insn
static
struct call_arg_loc_node* call_arg_loc_last
static
struct call_arg_loc_node* call_arg_locations
static
   Head and tail of call_arg_loc chain.  
int call_site_count = -1
static
   Number of call sites in the current function.  
char cold_end_label[MAX_ARTIFICIAL_LABEL_BYTES]
static
section* cold_text_section
static
   The default cold text section.  
char cold_text_section_label[MAX_ARTIFICIAL_LABEL_BYTES]
static
dw_line_info_table* cold_text_section_line_info
static
bool cold_text_section_used = false
static
const char* comdat_symbol_id
static
   The prefix to attach to symbols on DIEs in the current comdat debug
   info section.  
unsigned int comdat_symbol_number
static
   The index of the current symbol within the current comdat CU.  
comdat_type_node* comdat_type_list
static
   A list of type DIEs that have been separated into comdat sections.  

Referenced by should_move_die_to_comdat().

htab_t common_block_die_table
static
   A hash table of references to DIE's that describe COMMON blocks.
   The key is DECL_UID() ^ die_parent.  
dw_line_info_table* cur_line_info_table
static
   The current table to which we should emit line number information
   for the current function.  This will be set up at the beginning of
   assembly for the function.  
int current_function_has_inlines
static
   Record whether the function being analyzed contains inlined functions.  
rtx current_unit_personality
static
   Personality decl of current unit.  Used only when assembler does not support
   personality CFI.  
section* debug_abbrev_section
static
section* debug_addr_section
static
char debug_addr_section_label[MAX_ARTIFICIAL_LABEL_BYTES]
static
section* debug_aranges_section
static
section* debug_frame_section
static
section* debug_info_section
static
   Pointers to various DWARF2 sections.  
char debug_info_section_label[MAX_ARTIFICIAL_LABEL_BYTES]
static
section* debug_line_section
static
char debug_line_section_label[MAX_ARTIFICIAL_LABEL_BYTES]
static
section* debug_loc_section
static
section* debug_macinfo_section
static
section* debug_pubnames_section
static
section* debug_pubtypes_section
static
section* debug_ranges_section
static
section* debug_skeleton_abbrev_section
static
char debug_skeleton_abbrev_section_label[MAX_ARTIFICIAL_LABEL_BYTES]
static
section* debug_skeleton_info_section
static
char debug_skeleton_info_section_label[MAX_ARTIFICIAL_LABEL_BYTES]
static
section* debug_skeleton_line_section
static
char debug_skeleton_line_section_label[MAX_ARTIFICIAL_LABEL_BYTES]
static
section* debug_str_dwo_section
static
htab_t debug_str_hash
static
section* debug_str_offsets_section
static
section* debug_str_section
static
htab_t decl_die_table
static
   A hash table of references to DIE's that describe declarations.
   The key is a DECL_UID() which is a unique number identifying each decl.  

Referenced by remove_AT().

htab_t decl_loc_table
static
   Table of decl location linked lists.  

Referenced by gen_namespace_die().

vec<tree, va_gc>* decl_scope_table
static
   A pointer to the base of a table of references to declaration
   scopes.  This table is a display which tracks the nesting
   of declaration scopes at the current scope and containing
   scopes.  This table is used to find the proper place to
   define type declaration DIE's.  
limbo_die_node* deferred_asm_name
static
   A list of DIEs for which we may have to generate
   DW_AT_{,MIPS_}linkage_name once their DECL_ASSEMBLER_NAMEs are set.  
vec<deferred_locations, va_gc>* deferred_locations_list
static
const char*(* demangle_name_func)(const char *)
static
   We allow a language front-end to designate a function that is to be
   called to "demangle" any name before it is put into a DIE.  
int dw2_string_counter
static
vec<dw_fde_ref, va_gc>* fde_vec
static

Referenced by fde_needed_for_eh_p().

htab_t file_table
static
   Filenames referenced by this compilation unit.  

Referenced by add_pubtype(), and prune_unused_types_prune().

struct dwarf_file_data* file_table_last_lookup
static
   Cached result of previous call to lookup_filename.  
unsigned int first_loclabel_num_not_at_text_label
static
   One above highest N where .LVLN label might be equal to .Ltext0 label.  

Referenced by declare_in_namespace().

HOST_WIDE_INT frame_pointer_fb_offset
static
   Offset from the "steady-state frame pointer" to the frame base,
   within the current function.  
bool frame_pointer_fb_offset_valid
static
vec<tree, va_gc>* generic_type_instances
static
   Instances of generic types for which we need to generate debug
   info that describe their generic parameters and arguments. That
   generation needs to happen once all types are properly laid out so
   we do it at the end of compilation.  
bool have_location_lists
static
   Whether we have location lists that need outputting 
bool have_multiple_function_sections = false
static
   True if the compilation unit places functions in more than one section.  

Referenced by declare_in_namespace(), decls_for_scope(), and gen_namespace_die().

bool in_first_function_p = true
static
   True if before or during processing of the first function being emitted.  
vec<tree, va_gc>* incomplete_types
static
   A pointer to the base of a list of incomplete types which might be
   completed at some later time.  incomplete_types_list needs to be a
   vec<tree, va_gc> *because we want to tell the garbage collector about
   it.  
bool info_section_emitted
static
   A flag to tell pubnames/types export if there is an info section to
   refer to.  
int label_num
static
   Number of internal labels generated by gen_internal_sym().  
struct dwarf_file_data* last_emitted_file
static
   The last file entry emitted by maybe_emit_file().  
rtx last_var_location_insn
static
limbo_die_node* limbo_die_list
static
   A list of DIEs with a NULL parent waiting to be relocated.  

Referenced by get_die_parent().

unsigned int line_info_label_num
static
   A global counter for generating labels for line number data.  
char loc_section_label[MAX_ARTIFICIAL_LABEL_BYTES]
static
unsigned int loclabel_num
static
   Unique label counter.  

Referenced by is_redundant_typedef().

char macinfo_section_label[MAX_ARTIFICIAL_LABEL_BYTES]
static
vec<macinfo_entry, va_gc>* macinfo_table
static
   A pointer to the base of a table that contains a list of macro
   defines/undefines (and file start/end markers).  
bool maybe_at_text_label_p = true
static
   True if loc_note during dwarf2out_var_location call might still be
   before first real instruction at address equal to .Ltext0.  
unsigned long next_die_offset
static
   This location is used by calc_die_sizes() to keep track
   the offset of each DIE within the .debug_info section.  

Referenced by copy_decls_for_unworthy_types().

unsigned int poc_label_num
static
   Unique label counter for point-of-call tables.  
int print_indent
static
   Keep track of the number of spaces used to indent the
   output of the debugging routines that print the structure of
   the DIE internal representation.  
char* producer_string
static
vec<pubname_entry, va_gc>* pubname_table
static
   A pointer to the base of a table that contains a list of publicly
   accessible names.  
vec<pubname_entry, va_gc>* pubtype_table
static
   A pointer to the base of a table that contains a list of publicly
   accessible types.  
dw_ranges_by_label_ref ranges_by_label
static
   Array of pairs of labels referenced in ranges_table.  
unsigned ranges_by_label_allocated
static
   Number of elements currently allocated for ranges_by_label.  
unsigned ranges_by_label_in_use
static
   Number of elements in ranges_by_label currently in use.  

Referenced by get_skeleton_type_unit().

char ranges_section_label[2 *MAX_ARTIFICIAL_LABEL_BYTES]
static
dw_ranges_ref ranges_table
static
   Array of dies for which we should generate .debug_ranges info.  
unsigned ranges_table_allocated
static
   Number of elements currently allocated for ranges_table.  
unsigned ranges_table_in_use
static
   Number of elements in ranges_table currently in use.  
vec<dw_line_info_table_p, va_gc>* separate_line_info
static
   The set of all non-default tables of line number info.  
dw_die_ref single_comp_unit_die
static
   Record the root of the DIE's built for the current compilation unit.  

Referenced by dw_addr_op().

htab_t skeleton_debug_str_hash
static
   With split_debug_info, both the comp_dir and dwo_name go in the
   main object file, rather than the dwo, similar to the force_direct
   parameter elsewhere but with additional complications:

   1) The string is needed in both the main object file and the dwo.
   That is, the comp_dir and dwo_name will appear in both places.

   2) Strings can use three forms: DW_FORM_string, DW_FORM_strp or
   DW_FORM_GNU_str_index.

   3) GCC chooses the form to use late, depending on the size and
   reference count.

   Rather than forcing the all debug string handling functions and
   callers to deal with these complications, simply use a separate,
   special-cased string table for any attribute that should go in the
   main object file.  This limits the complexity to just the places
   that need it.  
int tail_call_site_count = -1
static
   Number of tail call sites in the current function.  
char text_end_label[MAX_ARTIFICIAL_LABEL_BYTES]
static
   Definitions of defaults for formats and names of various special
   (artificial) labels which may be generated within this file (when the -g
   options is used and DWARF2_DEBUGGING_INFO is in effect.
   If necessary, these may be overridden from within the tm.h file, but
   typically, overriding these defaults is unnecessary.  
char text_section_label[MAX_ARTIFICIAL_LABEL_BYTES]
static
dw_line_info_table* text_section_line_info
static
   The two default tables of line number info.  
bool text_section_used = false
static
   Whether the default text and cold text sections have been used at all.  

Referenced by move_linkage_attr().

vec<die_arg_entry, va_gc>* tmpl_value_parm_die_table
static
vec<rtx, va_gc>* used_rtx_array
static
   Array of RTXes referenced by the debugging information, which therefore
   must be kept around forever.